diff --git a/deploy/conf/.env.template b/deploy/conf/.env.template index 3dc4f380a..b4859563a 100644 --- a/deploy/conf/.env.template +++ b/deploy/conf/.env.template @@ -8,7 +8,6 @@ DB_NAME=comsesnet DB_USER=comsesnet DB_HOST=db DB_PORT=5432 -DB_PASSWORD= CLEAN_DATABASE="false" # allowed values: "true" or "false" # elastic search @@ -16,7 +15,6 @@ ES_VERSION=7.17.18 # captcha HCAPTCHA_SITEKEY= -# HCAPTCHA_SECRET= # discourse DISCOURSE_BASE_URL= @@ -24,23 +22,14 @@ DISCOURSE_API_USERNAME= # email EMAIL_SUBJECT_PREFIX=[CoMSES Net] -# MAILGUN_API_KEY= MAILGUN_SENDER_DOMAIN= # logging LOG_DIRECTORY=/shared/logs SENTRY_DSN= -# secrets -# DISCOURSE_SSO_SECRET= -# DISCOURSE_API_KEY= -# django secret key -# SECRET_KEY= - GITHUB_CLIENT_ID= -# GITHUB_CLIENT_SECRET= ORCID_CLIENT_ID= -# ORCID_CLIENT_SECRET= # storage DATA_ROOT=/shared diff --git a/django/core/settings/defaults.py b/django/core/settings/defaults.py index 2948e6dcc..a8706dbba 100644 --- a/django/core/settings/defaults.py +++ b/django/core/settings/defaults.py @@ -286,9 +286,11 @@ def is_test(self): SHARE_DIR = "/shared" LOG_DIRECTORY = os.getenv("LOG_DIRECTORY", os.path.join(BASE_DIR, "logs")) -LIBRARY_ROOT = os.getenv("LIBRARY_ROOT", os.path.join(BASE_DIR, "library")) +LIBRARY_ROOT = os.getenv("LIBRARY_ROOT") +if not LIBRARY_ROOT: + raise ValueError("LIBRARY_ROOT not configured") PREVIOUS_SHARE_ROOT = os.path.join(SHARE_DIR, ".latest") -REPOSITORY_ROOT = os.getenv("REPOSITORY_ROOT", os.path.join(BASE_DIR, "repository")) +REPOSITORY_ROOT = os.getenv("REPOSITORY_ROOT") BORG_ROOT = "/shared/backups/repo" BACKUP_ROOT = "/shared/backups" EXTRACT_ROOT = "/shared/extract" diff --git a/django/deploy/cron.daily/backup b/django/deploy/cron.daily/backup index da0444ff7..e7639fec9 100755 --- a/django/deploy/cron.daily/backup +++ b/django/deploy/cron.daily/backup @@ -1,4 +1,4 @@ #!/bin/sh export DJANGO_SETTINGS_MODULE="core.settings.production" -/usr/local/bin/inv -r /code db.backup borg.backup > /var/log/comses-backup.log 2>&1 +/usr/local/bin/inv -r /code db.backup borg.backup >> /shared/logs/comses-backup.log 2>&1