diff --git a/docs/server_setup.adoc b/docs/server_setup.adoc index 99592a2..e5621ee 100644 --- a/docs/server_setup.adoc +++ b/docs/server_setup.adoc @@ -55,36 +55,16 @@ ssh admin@SERVER_NAME cd ~/advlabdb ---- -.. Nginx configuration +.. Settings -... Copy the template for the Nginx configuration: +... Copy the example file for the settings: + [source,bash] ---- -cp advlabdb/scripts/setup/advlabdb.conf.template advlabdb/scripts/setup/advlabdb.conf +cp settings_example.ini settings.ini ---- -... Change `server_name` in `advlabdb/scripts/setup/advlabdb.conf` to your SERVER_NAME. - -.. Environment variables - -... Copy the template for the environment variables: -+ -[source,bash] ----- -cp .env.template .env ----- - -... Generate secrets for `.env`: -+ -[source,bash] ----- -python3 advlabdb/scripts/setup/generate_secrets.py ----- - -... Fill the secrets generated using the last script into `.env`. - -... Enter your SERVER_NAME in `.env`. +... Enter your SERVER_NAME in `settings.ini`. .. Timezone @@ -137,14 +117,7 @@ cd ~/advlabdb + [source,bash] ---- -poetry run python3 -m advlabdb.scripts.setup.init_database ----- - -.. Restart the gunicorn service: -+ -[source,bash] ----- -sudo systemctl restart gunicorn +poetry run python3 manage.py setup initialize-database ---- .. *Done!* Now go to your SERVER_NAME using a browser to verify that everything is working.