Skip to content

Commit

Permalink
Add templates for production env files
Browse files Browse the repository at this point in the history
  • Loading branch information
willfurnass committed Feb 2, 2021
1 parent 496d999 commit 93c9ba2
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .envs/.production/.django.tmpl
Original file line number Diff line number Diff line change
@@ -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. [email protected]
DJANGO_SERVER_EMAIL=$TMPL_SERVER_EMAIL
EMAIL_HOST=
EMAIL_PORT=587
EMAIL_USE_TLS=True
# E.g. [email protected]
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
10 changes: 10 additions & 0 deletions .envs/.production/.postgres.tmpl
Original file line number Diff line number Diff line change
@@ -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=jvWaPUIpOt6NezC5BBzBQNRWtKL73fNkYxOunmMTdlbUT2lNil4pIWWHEGOrhG4p

4 changes: 4 additions & 0 deletions .envs/.production/.traefik.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Host manager email address e.g. [email protected]
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`)"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -331,3 +331,4 @@ reprohack_hub/media/
.env
.envs/*
!.envs/.local/
!.envs/.production/*.tmpl

0 comments on commit 93c9ba2

Please sign in to comment.