added the prod deployment instructions
This commit is contained in:
parent
9eb1ef335a
commit
8eba0fffd4
1 changed files with 29 additions and 5 deletions
34
README.md
34
README.md
|
@ -18,9 +18,33 @@ a profile is
|
|||
- microchipped
|
||||
- and whatever else i think of
|
||||
|
||||
# TODOs
|
||||
# Setting it up for prod
|
||||
|
||||
- p2: privacy policy and GDPR notice
|
||||
- p2: saving register form as it gets filled / re-display it with partial values
|
||||
- account
|
||||
- p2: optional email for forgotten password i guess
|
||||
The project is [packaged for NixOS](https://nur.nix-community.org/repos/arteneko/); if you don't use NixOS, you will need to compile it yourself with the rust toolchain.
|
||||
|
||||
This project requires rust (stable, at least v1.84.0 which is the version i use) and cargo, as well as a postgresql database.
|
||||
|
||||
```
|
||||
$ git clone https://git.sr.ht/~artemis/dolltags
|
||||
$ cd dolltags
|
||||
$ cargo build --release
|
||||
```
|
||||
|
||||
You will also need to bundle the `assets/` and `templates/` directory.
|
||||
|
||||
In both cases, the daemon/CLI requires a configuration file, by default named `Rocket.toml` and loaded from the CWD but which can be pointed to a custom file using the `ROCKET_CONFIG` environment variable.
|
||||
Likewise, the assets and template directories will be by default loaded from the CWD but can be pointed to a custom directory using the environment variable `ASSETS_PATH`.
|
||||
However, the template directory is expected to be in the CWD with no way to change it as-is for now (it will try to search in `$PWD/templates`).
|
||||
|
||||
The configuration file requires two keys, shown below.
|
||||
|
||||
```toml
|
||||
[default]
|
||||
secret_key = "use `openssl rand -base64 32` to generate it"
|
||||
|
||||
[default.databases.dolltags]
|
||||
url = "postgres://dolltags:password@localhost/dolltags"
|
||||
```
|
||||
|
||||
- `secret_key` is required to securely handle the user sessions; changing the secret key will immediately disconnect any previously-working session
|
||||
- `url` for the database follows the PostgreSQL connection URL format and should support all its arguments and variants
|
||||
|
|
Loading…
Add table
Reference in a new issue