velouria/tandoor/docker-compose.yml

63 lines
1.6 KiB
YAML

services:
db_recipes:
restart: always
image: postgres:16-alpine
volumes:
- ./postgresql:/var/lib/postgresql/data
env_file:
- ./.env
networks:
- default
web_recipes:
restart: always
image: vabene1111/recipes
env_file:
- ./.env
volumes:
- staticfiles:/opt/recipes/staticfiles
# Do not make this a bind mount, see https://docs.tandoor.dev/install/docker/#volumes-vs-bind-mounts
- nginx_config:/opt/recipes/nginx/conf.d
- ./mediafiles:/opt/recipes/mediafiles
depends_on:
- db_recipes
networks:
- default
nginx_recipes:
image: nginx:mainline-alpine
restart: always
ports:
- "9095:80"
env_file:
- ./.env
volumes:
# Do not make this a bind mount, see https://docs.tandoor.dev/install/docker/#volumes-vs-bind-mounts
- nginx_config:/etc/nginx/conf.d:ro
- staticfiles:/static:ro
- ./mediafiles:/media:ro
labels:
- "traefik.enable=true"
- "traefik.http.routers.recipes.rule=Host(`recipes.velouria.dev`)"
- "traefik.http.routers.recipes.entrypoints=websecure"
- "traefik.http.routers.recipes.tls.certresolver=myresolver"
- "traefik.http.services.recipes.loadbalancer.server.port=80"
- "traefik.docker.network=traefik_network"
- "homepage.group=Utilities"
- "homepage.name=Recipes"
- "homepage.description=Bookmark"
depends_on:
- web_recipes
networks:
- default
- traefik_network
networks:
default:
traefik_network:
external: true
volumes:
nginx_config:
staticfiles: