Skip to content

Commit 8ef83e1

Browse files
authored
Merge pull request #549 from MerginMaps/introduce-init-command
Introudce init command
2 parents bdb587c + 410b77c commit 8ef83e1

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/server/install/index.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,19 @@ $ docker-compose -f docker-compose.yml up
3636
```
3737
​​
3838
### Initialise database
39-
If server is started for the first time, database needs to be initialised and super-user created (set admin username, password and email):
39+
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 (the command generates password for the admin account):
40+
```shell
41+
$ docker exec merginmaps-server flask init
42+
```
43+
44+
If you don't have `CONTACT_EMAIL` variable 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-initialised.
45+
46+
:::tip
47+
If you want to create another users manually, you can use the following command:
4048
```shell
41-
$ docker exec merginmaps-server flask init-db
4249
$ docker exec merginmaps-server flask user create <username> <password> --is-admin --email <email>
4350
```
51+
:::
4452

4553
### Setup environment
4654

0 commit comments

Comments
 (0)