@ -26,10 +26,24 @@ That's a little more complicated.
Eventually we'll have 2 different environments, development and production, each with different logging and such.
0. Make sure you have a /supported/ database installed and working, either sqlite, or Postgres.
1. Initialise the database with the following command `sqlite3 ephemeral.db < schema.sql`
1. Initialise the database with the following command `sqlite3 ephemeral.db < schema.sql`
1.1. If you want to speed up sqlite a little bit more, run `sqlite3 ephemeral.db` and then `PRAGMA synchronous = OFF;` and then Ctrl+D
2. Compile and run ephemeral with `LOG=debug cargo run` for the debug build. `LOG=info cargo run -r` will run the release build.
### Production (nginx proxy)
This is the exact setup I'm using to run the test instance <https://cz0.au>
0. git clone this repo. preferably as `/opt/ephemeral/`
1. Create the DB `sqlite3 ephemeral.db < schema.sql` (Half broken, requires a dummy file to compile)
2. If you want to speed up sqlite a little bit more, run `sqlite3 ephemeral.db` and then `PRAGMA synchronous = OFF;` and then Ctrl+D
3. Copy the systemd service `sudo cp ephemeral.service /etc/systemd/system/`, editing if necessary
4. Compile the release version. `cargo build --release`
5. Use `/docs/nginx.conf` as a base for your nginx config. You're on your own for this.
6. `sudo systemctl daemon-reload` then `sudo systemctl enable ephemeral` and `sudo systemctl start ephemeral` to reload systemd, get ephemeral to run at startup, and run it.
To see the logs (even in colour!) use `sudo journalctl -xefu ephemeral --output cat`
### Configuration Options
Configuration options are available in the `config.toml' file.