Skip to content

Commit

Permalink
Introudce init command
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcelGeo committed Feb 10, 2025
1 parent a5e238c commit 3509e14
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/server/install/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ $ docker-compose -f docker-compose.yml up
```
​​
### Initialise database
If server is started for the first time, database needs to be initialised and super-user created (set admin username, password and email):
If server is started for the first time, database needs to be initialised and super-user created. Use the `init` command which will perform it automatically (check the command outputs to get the password):
```shell
$ docker exec merginmaps-server flask init-db
$ docker exec merginmaps-server flask user create <username> <password> --is-admin --email <email>
$ docker exec merginmaps-server flask init
```

If you don't have `CONTACT_EMAIL` variabe set, you will be asked to provide a super user email using the `-e`/`--email` option. The `init` will also check your server setup (celery jobs, emails, etc.) and print out a list of missing variables. If you see any errors in the console output, you can run the command again as the database and super user will not be re-initialized.

### Setup environment
Now tweak deployment settings by modifying environment variables. You have to fix all variables marked as required in this list of [environment variables](../administer/environment.md). Some of the most common issues with custom deployments are listed in the [troubleshoot](../troubleshoot/index.md) section.

0 comments on commit 3509e14

Please sign in to comment.