name: rentaldrivego-portainer-prod

services:
  portainer:
    image: portainer/portainer-ce:lts
    command: -H unix:///var/run/docker.sock
    restart: unless-stopped
    networks:
      - traefik-proxy
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - portainer_prod_data:/data
    labels:
      - traefik.enable=true
      - traefik.http.routers.portainer.rule=Host(`${PORTAINER_DOMAIN:-portainer.rentaldrivego.ma}`)
      - traefik.http.routers.portainer.entrypoints=websecure
      - traefik.http.routers.portainer.tls=true
      - traefik.http.routers.portainer.tls.certresolver=letsencrypt
      - traefik.http.routers.portainer.service=portainer-svc
      - traefik.http.services.portainer-svc.loadbalancer.server.port=9000

networks:
  traefik-proxy:
    external: true

volumes:
  portainer_prod_data:
