services:
  media_static:
    image: nginx:alpine
    container_name: media_static
    restart: unless-stopped
    volumes:
      - /home/media:/usr/share/nginx/html:ro
      - /home/media/nginx.conf:/etc/nginx/conf.d/default.conf:ro
    networks:
      - easypanel
    labels:
      - "traefik.enable=true"
      - "traefik.docker.network=easypanel"
      - "traefik.http.routers.media.rule=Host(`media.eventoscomunicarte.com`)"
      - "traefik.http.routers.media.entrypoints=https"
      - "traefik.http.routers.media.tls=true"
      - "traefik.http.routers.media.tls.certresolver=letsencrypt"
      - "traefik.http.services.media.loadbalancer.server.port=80"
      - "traefik.http.routers.media-http.rule=Host(`media.eventoscomunicarte.com`)"
      - "traefik.http.routers.media-http.entrypoints=http"
      - "traefik.http.routers.media-http.middlewares=media-redirect"
      - "traefik.http.middlewares.media-redirect.redirectscheme.scheme=https"
      - "traefik.http.middlewares.media-redirect.redirectscheme.permanent=true"

networks:
  easypanel:
    external: true
