services:
  php:
    container_name: rs971_app
    build:
      context: .
      dockerfile: docker/php/Dockerfile
    restart: unless-stopped
    environment:
      - SERVER_NAME=:80
    volumes:
      - ./backend:/app
    networks:
      - traefik-public
      - db-network
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.sargasses.rule=Host(`radarsargasses971.com`)"
      - "traefik.http.routers.sargasses.entrypoints=websecure"
      - "traefik.http.routers.sargasses.tls=true"
      - "traefik.http.routers.sargasses.tls.certresolver=letsencrypt"
      - "traefik.http.services.sargasses.loadbalancer.server.port=80"

volumes: {}

networks:
  traefik-public:
    external: true
  db-network:
    external: true
