diff --git a/README.md b/README.md index a45c57f..1c74689 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Merge multiple iCalendar feeds into one and serve the result over HTTP. Built wi 2. Edit `.env` and set your calendar URLs and Traefik host. -3. Start behind Traefik (requires external `proxy` network): +3. Start the published image behind Traefik (requires external `proxy` network): ```bash docker compose up -d @@ -26,19 +26,15 @@ Merge multiple iCalendar feeds into one and serve the result over HTTP. Built wi ## Local testing (without Traefik) -Create `docker-compose.override.yml` (gitignored) with a port mapping: +Use the local build compose file for development and testing: -```yaml -services: - cal-funnel: - ports: - - "8080:8080" +```bash +docker compose -f docker-compose.local.yml up -d --build ``` Then run: ```bash -docker compose up -d curl http://localhost:8080/health curl http://localhost:8080/calendar.ics ``` @@ -64,6 +60,13 @@ curl http://localhost:8080/calendar.ics | `/health` | Health check (`200` when ready) | | `/` | Short HTML page with subscription link | +## Compose files + +| File | Purpose | +|------|---------| +| `docker-compose.yml` | Published deployment using the registry image `git.beging.de/troogs/cal-funnel:latest` and Traefik routing | +| `docker-compose.local.yml` | Local build/test deployment with `build: .` and `localhost:8080` published | + ## Build image ```bash diff --git a/docker-compose.local.yml b/docker-compose.local.yml new file mode 100644 index 0000000..6017d2d --- /dev/null +++ b/docker-compose.local.yml @@ -0,0 +1,10 @@ +services: + cal-funnel: + build: . + image: cal-funnel:local + container_name: cal-funnel-local + restart: unless-stopped + env_file: + - .env + ports: + - "8080:8080" \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 7f23828..eefa5ca 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,8 +1,6 @@ services: cal-funnel: - build: . - image: cal-funnel:latest - container_name: cal-funnel + image: git.beging.de/troogs/cal-funnel:latest restart: unless-stopped env_file: - .env @@ -30,4 +28,4 @@ services: networks: proxy: - external: true + external: true \ No newline at end of file