# https://github.com/mealie-recipes/mealie/pkgs/container/mealie # https://docs.mealie.io/documentation/getting-started/installation/postgres/ name: mealie secrets: mealie_postgresql_password: file: ${SECRETSDIR}/mealie_postgresql_password mealie_postgresql_database: file: ${SECRETSDIR}/mealie_postgresql_database mealie_postgresql_username: file: ${SECRETSDIR}/mealie_postgresql_username smtp_destination: file: ${SECRETSDIR}/smtp_destination smtp_from: file: ${SECRETSDIR}/smtp_from smtp_host: file: ${SECRETSDIR}/smtp_host smtp_password: file: ${SECRETSDIR}/smtp_password smtp_username: file: ${SECRETSDIR}/smtp_username networks: traefik-net: external: true postgres-net: external: true services: mealie: image: ghcr.io/mealie-recipes/mealie:v2.2.0 # v1.12.0 hostname: mealie env_file: .mealie.env restart: unless-stopped deploy: resources: limits: memory: 1000M volumes: - "${DATADIR}/appdata:/app/data" depends_on: postgresql: condition: service_healthy secrets: - mealie_postgresql_database - mealie_postgresql_password - mealie_postgresql_username - smtp_destination - smtp_from - smtp_host - smtp_password - smtp_username networks: - postgres-net - traefik-net labels: - traefik.enable=true - traefik.docker.network=traefik-net # - "traefik.http.services.${APPLICATION_NAME}-svc.loadbalancer.server.port=${WEBUI_PORT}" # - "traefik.http.routers.${APPLICATION_NAME}-rtr.entrypoints=web" - "traefik.http.routers.${APPLICATION_NAME}-rtr.rule=Host(`${APPLICATION_NAME}.${DOMAINNAME}`)&& PathPrefix(`/`)" - "traefik.http.routers.${APPLICATION_NAME}-rtr.middlewares=http-mw-rateLimit-secureHeaders-compress-redirect@file" - "traefik.http.routers.${APPLICATION_NAME}-rtr.service=${APPLICATION_NAME}-svc" # - "traefik.http.routers.${APPLICATION_NAME}-secure-rtr.entrypoints=websecure" - "traefik.http.routers.${APPLICATION_NAME}-secure-rtr.rule=Host(`${APPLICATION_NAME}.${DOMAINNAME}`)&& PathPrefix(`/`)" - "traefik.http.routers.${APPLICATION_NAME}-secure-rtr.middlewares=http-mw-rateLimit-secureHeaders-compress@file" - "traefik.http.routers.${APPLICATION_NAME}-secure-rtr.tls=true" - "traefik.http.routers.${APPLICATION_NAME}-secure-rtr.tls.options=tls-options@file" - "traefik.http.routers.${APPLICATION_NAME}-secure-rtr.tls.certresolver=solver-dns" - "traefik.http.routers.${APPLICATION_NAME}-secure-rtr.service=${APPLICATION_NAME}-svc" postgresql: image: postgres:16-alpine hostname: "mealie_postgresql" shm_size: 128mb restart: unless-stopped env_file: .postgresql.env healthcheck: test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"] start_period: 20s interval: 30s retries: 5 timeout: 5s networks: postgres-net: aliases: ["mealie_postgresql"] secrets: - mealie_postgresql_database - mealie_postgresql_password - mealie_postgresql_username volumes: - "${DATADIR}/pgdata:/var/lib/postgresql/data" - "${DATADIR}/pgbackups:/mnt/backups"