services:
  caddy:
    image: caddy:wedding
    restart: unless-stopped
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - caddy_data:/data
      - caddy_config:/config
      - /root/.docker/config.json:/root/.docker/config.json:ro
    networks:
      - docker_wedding-site-network
    healthcheck: 
      test: "curl -f https://ru.homyk.space"
      interval: 5s
      timeout: 30s
      retries: 1
    environment:
      - PORT=${PORT}


volumes:
  caddy_data:
  caddy_config:
networks:
  docker_wedding-site-network :
    external: true