diff --git a/.envs/.production/.django.tmpl b/.envs/.production/.django.tmpl new file mode 100644 index 00000000..23710e75 --- /dev/null +++ b/.envs/.production/.django.tmpl @@ -0,0 +1,48 @@ +# General +# ------------------------------------------------------------------------------ +# DJANGO_READ_DOT_ENV_FILE=True +DJANGO_SETTINGS_MODULE=config.settings.production +# Django secret key should be a string of 64 alphanumeric chars +DJANGO_SECRET_KEY=$TMPL_SECRET_KEY +# Django admin url value should be a string of 64 alphanumeric chars terminted by a / +DJANGO_ADMIN_URL=$TMPL_ADMIN_URL/ +# List of server hostnames that Django will respond to requests for +# E.g. host.domain.com,alias.domain.com +DJANGO_ALLOWED_HOSTS=$TMPL_HOST,$TMPL_ALIAS + +# Security +# ------------------------------------------------------------------------------ +# TIP: better off using DNS, however, redirect is OK too +DJANGO_SECURE_SSL_REDIRECT=False + +# Email +# ------------------------------------------------------------------------------ +# E.g. alias@domain.com +DJANGO_SERVER_EMAIL=$TMPL_SERVER_EMAIL +EMAIL_HOST= +EMAIL_PORT=587 +EMAIL_USE_TLS=True +# E.g. alias@domain.com +DEFAULT_FROM_EMAIL=$TMPL_DEFAULT_FROM_EMAIL + +# django-allauth +# ------------------------------------------------------------------------------ +DJANGO_ACCOUNT_ALLOW_REGISTRATION=True + +# Gunicorn +# ------------------------------------------------------------------------------ +WEB_CONCURRENCY=4 + + +# Redis +# ------------------------------------------------------------------------------ +REDIS_URL=redis://redis:6379/0 + +# Celery +# ------------------------------------------------------------------------------ + +# Flower +# Celery Flower user should be an alphanumeric string +CELERY_FLOWER_USER=$TMPL_CELERY_FLOWER_USER +# Celery Flower password should be 64 alphanumeric chars +CELERY_FLOWER_PASSWORD=$TMPL_CELERY_FLOWER_PASSWORD diff --git a/.envs/.production/.postgres.tmpl b/.envs/.production/.postgres.tmpl new file mode 100644 index 00000000..042880a3 --- /dev/null +++ b/.envs/.production/.postgres.tmpl @@ -0,0 +1,10 @@ +# PostgreSQL +# ------------------------------------------------------------------------------ +POSTGRES_HOST=postgres +POSTGRES_PORT=5432 +POSTGRES_DB=reprohack_hub +# Postgres user should be an alpanumeric string +POSTGRES_USER=$TMPL_POSTGRES_USER +# Postgres password should be an alpanumeric string +POSTGRES_PASSWORD=$TMPL_POSTGRES_PASSWORD + diff --git a/.envs/.production/.traefik.tmpl b/.envs/.production/.traefik.tmpl new file mode 100644 index 00000000..fc04e7ca --- /dev/null +++ b/.envs/.production/.traefik.tmpl @@ -0,0 +1,4 @@ +# Host manager email address e.g. somebody@somedomain.com +HOST_MANAGER_EMAIL=$TMPL_EMAIL +# Host domains list e.g. "Host(`hostname.domain.com`) || Host(`alias.domain.com`)" +HOST_DOMAINS_LIST="Host(`$TMPL_HOST`) || Host(`$TMPL_HOST_ALIAS`)" diff --git a/.gitignore b/.gitignore index 88b7a896..470cb5b2 100644 --- a/.gitignore +++ b/.gitignore @@ -331,3 +331,6 @@ reprohack_hub/media/ .env .envs/* !.envs/.local/ +!.envs/.production +.envs/.production/* +!.envs/.production/*.tmpl