-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #89 from ssciwr/vm_readme
Add links to temporary VM to readme
- Loading branch information
Showing
3 changed files
with
53 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Deployment | ||
|
||
Some information on how to deploy the website - currently it is deployed on a temporary heicloud VM. | ||
|
||
## Production deployment | ||
|
||
Production docker container images are automatically built by CI. | ||
To deploy the latest version on a virtual machine with docker compose installed, | ||
download [docker-compose.yml](https://raw.githubusercontent.com/ssciwr/mondey/main/docker-compose.yml), then do | ||
|
||
``` | ||
sudo docker compose pull | ||
sudo docker compose up -d | ||
``` | ||
|
||
The location of the database directory, image files directory, SSL keys and secret key should be set | ||
either in env vars or in a file `.env` in the same location as the docker-compose.yml. | ||
|
||
TODO: document these options | ||
|
||
The current status of the containers can be checked with | ||
|
||
``` | ||
sudo docker compose ps | ||
sudo docker compose logs | ||
``` | ||
|
||
### Give users admin rights | ||
|
||
To make an existing user with email `[email protected]` into an admin, modify the users database, e.g. | ||
|
||
``` | ||
sqlite3 db/users.db | ||
sqlite> UPDATE user SET is_superuser = 1 WHERE email = '[email protected]'; | ||
sqlite> .quit | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,8 +28,9 @@ The first admin user can only be created by modifying the database directly. | |
After you have registered a user using the swagger UI, you can promote them to an admin user with e.g.: | ||
|
||
```bash | ||
sqlite3 users.db | ||
sqlite3 db/users.db | ||
sqlite> UPDATE user SET is_superuser = 1 WHERE email = '[email protected]'; | ||
sqlite> .quit | ||
``` | ||
|
||
## Configuration | ||
|