Tandoor
recipes.conf
server {
listen 80;
server_name localhost;
client_max_body_size 128M;
# serve media files
location /media/ {
alias /media/;
}
# pass requests for dynamic content to gunicorn
location / {
proxy_set_header Host $http_host;
proxy_pass http://recipes:8080;
}
}
---
services:
recipes:
image: vabene1111/recipes
container_name: recipes
restart: unless-stopped
environment:
- DB_ENGINE=django.db.backends.postgresql
- POSTGRES_HOST=db-postgres
- POSTGRES_PORT=5432
- POSTGRES_USER=tandoor
- POSTGRES_PASSWORD=${PASS-TANDOOR}
- POSTGRES_DB=tandoor
- TIMEZONE=${LOCATION}
- SECRET_KEY=${SECRET-TANDOOR}
- GUNICORN_MEDIA=0
- DEBUG=0
volumes:
- ${DATA-TANDOOR-}staticfiles:/opt/recipes/staticfiles
- ${DATA-TANDOOR-}mediafiles:/opt/recipes/mediafiles
- ${DATA-COOKBOOKS}/pdf:/opt/recipes/pdf
ports:
- 8083:8080
networks:
- db-postgres-net
- swag
recipes-nginx:
image: nginx:mainline-alpine
container_name: recipes-nginx
restart: unless-stopped
depends_on:
- recipes
volumes:
- ${DATA-TANDOOR-}nginx_config:/etc/nginx/conf.d:ro
- ${DATA-TANDOOR-}staticfiles:/static
- ${DATA-TANDOOR-}mediafiles:/media
ports:
- 8086:80
networks:
- swag
networks:
swag:
external: true
db-postgres-net:
external: true