.env.example
Set these on your host before deploying. Each platform has an “Environment Variables” section in the deploy flow.
COMPOSE_PROJECT_NAME
Rather than use the directory name, let's control the name of the project.
PYTHONDONTWRITEBYTECODE
In development avoid writing out bytecode to __pycache__ directories. PYTHONDONTWRITEBYTECODE=
SECRET_KEY
secret
You should generate a random string of 50+ characters for this value in prod. You can generate a secure secret by running: ./run secret
DEBUG
This should never be set to true in production but it should be enabled in dev. export DEBUG=false
NODE_ENV
Which Node environment is running? This should be "development" or "production". export NODE_ENV=production
ALLOWED_HOSTS
A comma separated list of allowed hosts. In production this should be your domain name, such as "example.com,www.example.com" or…
WEB_CONCURRENCY
How many workers and threads should your app use? WEB_CONCURRENCY defaults to the server's CPU count * 2. That is a good starting point. In…
WEB_RELOAD
Do you want code reloading to work with the gunicorn app server? export WEB_RELOAD=false
POSTGRES_USER
You'll always want to set POSTGRES_USER and POSTGRES_PASSWORD since the postgres Docker image uses them for its default database user and…
POSTGRES_PASSWORD
secret
DOCKER_RESTART_POLICY
Should Docker restart your containers if they go down in unexpected ways? export DOCKER_RESTART_POLICY=unless-stopped
DOCKER_WEB_HEALTHCHECK_TEST
What health check test command do you want to run? In development, having it curl your web server will result in a lot of log spam, so…
DOCKER_WEB_PORT_FORWARD
What ip:port should be published back to the Docker host for the app server? If you're using Docker Toolbox or a custom VM you can't use…
DOCKER_WEB_VOLUME
What volume path should be used? In dev we want to volume mount everything so that we can develop our code without rebuilding our Docker…
brew install flyctl && fly launch --from https://github.com/josephmisiti/docker-django-example
curl -L https://fly.io/install.sh | sh && fly launch --from https://github.com/josephmisiti/docker-django-example
iwr https://fly.io/install.ps1 -useb | iex; fly launch --from https://github.com/josephmisiti/docker-django-example