# yaml-language-server: $schema=https://raw.githubusercontent.com/compose-spec/compose-go/master/schema/compose-spec.json
# Production environment override
services:
  php:
    image: ghcr.io/marijndoeve/tijdvoordetest:${IMAGE_TAG}
    environment:
      APP_SECRET: ${APP_SECRET}
      MERCURE_PUBLISHER_JWT_KEY: ${CADDY_MERCURE_JWT_SECRET}
      MERCURE_SUBSCRIBER_JWT_KEY: ${CADDY_MERCURE_JWT_SECRET}
      MAILER_DSN: ${MAILER_DSN}
      MAILER_SENDER: ${MAILER_SENDER}
      SENTRY_DSN: ${SENTRY_DSN}
      SENTRY_RELEASE: ${SENTRY_RELEASE}
      SENTRY_ENVIRONMENT: ${SENTRY_ENVIRONMENT}
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.tvdt.rule=Host(`tijdvoordetest.nl`)"
      - "traefik.http.routers.tvdt.entrypoints=websecure"
      - "traefik.http.routers.tvdt.tls.certresolver=marijndoeve"
      - "traefik.http.routers.tvdt.service=tvdt"
      - "traefik.http.services.tvdt.loadbalancer.server.port=80"
    networks:
      - web
      - internal
  database:
    networks:
      - internal
    ports:
      - "5430:5432"
networks:
  web:
    external: true
  internal:
    external: false  
