app-store/apps/tandoor/docker-compose.yml

62 lines
2.3 KiB
YAML
Raw Normal View History

version: "3.7"
services:
tandoor:
container_name: tandoor
image: ghcr.io/tandoorrecipes/recipes:1.5.4
volumes:
- ${APP_DATA_DIR}/staticfiles:/opt/recipes/staticfiles
- ${APP_DATA_DIR}/mediafiles:/opt/recipes/mediafiles
ports:
- ${APP_PORT}:8080
environment:
- SECRET_KEY=${TANDOOR_SECRET_KEY}
- DB_ENGINE=django.db.backends.postgresql
- POSTGRES_HOST=db_recipes
- POSTGRES_PORT=5432
- POSTGRES_USER=djangodb
- POSTGRES_PASSWORD=${TANDOOR_POSTGRESS_PASSWORD}
- POSTGRES_DB=djangodb
networks:
- tipi_main_network
labels:
# Main
traefik.enable: true
traefik.http.middlewares.tandoor-web-redirect.redirectscheme.scheme: https
traefik.http.services.tandoor.loadbalancer.server.port: 8341
# Web
traefik.http.routers.tandoor-insecure.rule: Host(`${APP_DOMAIN}`)
traefik.http.routers.tandoor-insecure.entrypoints: web
traefik.http.routers.tandoor-insecure.service: tandoor
traefik.http.routers.tandoor-insecure.middlewares: tandoor-web-redirect
# Websecure
traefik.http.routers.tandoor.rule: Host(`${APP_DOMAIN}`)
traefik.http.routers.tandoor.entrypoints: websecure
traefik.http.routers.tandoor.service: tandoor
traefik.http.routers.tandoor.tls.certresolver: myresolver
# Local domain
traefik.http.routers.tandoor-local-insecure.rule: Host(`tandoor.${LOCAL_DOMAIN}`)
traefik.http.routers.tandoor-local-insecure.entrypoints: web
traefik.http.routers.tandoor-local-insecure.service: tandoor
traefik.http.routers.tandoor-local-insecure.middlewares: tandoor-web-redirect
# Local domain secure
traefik.http.routers.tandoor-local.rule: Host(`tandoor.${LOCAL_DOMAIN}`)
traefik.http.routers.tandoor-local.entrypoints: websecure
traefik.http.routers.tandoor-local.service: tandoor
traefik.http.routers.tandoor-local.tls: true
2023-08-13 11:19:36 +00:00
depends_on:
2023-08-13 11:13:51 +00:00
- tandoor_db
2023-08-13 11:19:36 +00:00
tandoor_db:
restart: always
image: postgres:15-alpine
volumes:
- ${APP_DATA_DIR}/postgresql:/var/lib/postgresql/data
2023-08-13 11:21:40 +00:00
environment:
2023-08-13 11:19:36 +00:00
- POSTGRES_HOST=db_recipes
- POSTGRES_PORT=5432
- POSTGRES_USER=djangodb
- POSTGRES_PASSWORD=${TANDOOR_POSTGRESS_PASSWORD}
- POSTGRES_DB=djangodb
networks:
- tipi_main_network