services:
  dashcaddy-api:
    build: {{API_PATH}}
    container_name: dashcaddy-api
    ports:
      - "{{API_PORT}}:{{API_PORT}}"
    volumes:
      - {{API_PATH}}:/app
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - NODE_ENV=production
      - PORT={{API_PORT}}
      - SERVICES_FILE=/app/services.json
      - CADDY_ADMIN_URL=http://host.docker.internal:2019
    restart: unless-stopped
    networks:
      - dashcaddy

networks:
  dashcaddy:
    driver: bridge
