mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2025-12-24 02:39:20 -05:00
41 lines
897 B
YAML
41 lines
897 B
YAML
version: "3"
|
|
services:
|
|
db_recipes:
|
|
restart: always
|
|
image: "postgres:11-alpine"
|
|
volumes:
|
|
- ./postgresql:/var/lib/postgresql/data
|
|
env_file:
|
|
- ./.env
|
|
|
|
web_recipes:
|
|
build: .
|
|
restart: always
|
|
env_file:
|
|
- ./.env
|
|
command: "gunicorn --bind 0.0.0.0:8080 recipes.wsgi"
|
|
volumes:
|
|
- .:/Recipes
|
|
depends_on:
|
|
- db_recipes
|
|
|
|
nginx_recipes:
|
|
image: "nginx"
|
|
restart: always
|
|
env_file:
|
|
- ./.env
|
|
volumes:
|
|
- ./nginx/conf.d:/etc/nginx/conf.d
|
|
- ./staticfiles:/static
|
|
- ./mediafiles:/media
|
|
labels:
|
|
- "traefik.enable=true"
|
|
- "traefik.http.routers.recipes.rule=Host(`recipes.mydomain.com`, `recipes.myotherdomain.com`)"
|
|
- "traefik.http.routers.recipes.entrypoints=web_secure"
|
|
- "traefik.http.routers.recipes.tls.certresolver=le_resolver"
|
|
|
|
networks:
|
|
default:
|
|
external:
|
|
name: traefik
|