Files
homeprod/docker/personal/tandoor/docker-compose.yml
2025-03-22 14:29:48 +01:00

72 lines
1.4 KiB
YAML

services:
db_recipes:
restart: always
image: postgres:16-alpine
volumes:
- postgresql:/var/lib/postgresql/data
env_file:
- ./.env
web_recipes:
restart: always
image: vabene1111/recipes
env_file:
- ./.env
volumes:
- staticfiles:/opt/recipes/staticfiles
- nginx_config:/opt/recipes/nginx/conf.d
- mediafiles:/opt/recipes/mediafiles
depends_on:
- db_recipes
nginx_recipes:
image: nginx:mainline-alpine
restart: always
networks:
- default
- proxy
ports:
- 80
env_file:
- ./.env
depends_on:
- web_recipes
volumes:
- nginx_config:/etc/nginx/conf.d:ro
- staticfiles:/static:ro
- mediafiles:/media:ro
labels:
- "traefik.enable=true"
- "traefik.http.routers.nginx_recipes.rule=Host(`tandoor.local`)"
volumes:
nginx_config:
driver: local
driver_opts:
type: 'none'
o: 'bind'
device: '/app/tandoor/nginx_config'
staticfiles:
driver: local
driver_opts:
type: 'none'
o: 'bind'
device: '/app/tandoor/staticfiles'
mediafiles:
driver: local
driver_opts:
type: 'none'
o: 'bind'
device: '/app/tandoor/mediafiles'
postgresql:
driver: local
driver_opts:
type: 'none'
o: 'bind'
device: '/app/tandoor/db'
networks:
proxy:
external: true
name: proxy