Skip to content
Permalink
255f1044cd
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
77 lines (72 sloc) 1.94 KB
name: city-traffic
services:
web:
image: nginx:latest
ports:
- "80:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
- static-data:/city_traffic/staticfiles
depends_on:
- app
app:
build:
context: .
dockerfile: Dockerfile
environment:
# In a production environment, the secret key should be kept secret and
# should be a long, random string. Also, the "ALLOWED_HOSTS" variable
# should be set to a list of allowed hostnames separated by commas.
SECRET_KEY: city-traffic
DEBUG: false
ALLOWED_HOSTS: localhost,127.0.0.1
DB_HOST: db
DB_PORT: 5432
DB_NAME: city-traffic
DB_USER: city-traffic
DB_PASSWORD: city-traffic
ports:
- "8000:8000"
entrypoint: /city_traffic/app.sh
volumes:
- static-data:/city_traffic/staticfiles
- media-data:/city_traffic/media
depends_on:
- db
job:
build:
context: .
dockerfile: Dockerfile
environment:
# In a production environment, the secret key should be kept secret and
# should be a long, random string. Also, the "ALLOWED_HOSTS" variable
# should be set to a list of allowed hostnames separated by commas.
SECRET_KEY: city-traffic
DEBUG: false
ALLOWED_HOSTS:
DB_HOST: db
DB_PORT: 5432
DB_NAME: city-traffic
DB_USER: city-traffic
DB_PASSWORD: city-traffic
entrypoint: /city_traffic/job.sh
volumes:
- media-data:/city_traffic/media
depends_on:
- app
- db
db:
image: postgres:latest
restart: unless-stopped
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
# In a production environment, the "POSTGRES_PASSWORD" variable should be
# set to a strong password.
POSTGRES_USER: city-traffic
POSTGRES_PASSWORD: city-traffic
POSTGRES_DB: city-traffic
volumes:
postgres-data:
static-data:
media-data: