From c1041e30629f701c1657741235fb1c5c6e174549 Mon Sep 17 00:00:00 2001 From: tiennm99 Date: Wed, 7 Oct 2026 08:47:35 +0700 Subject: [PATCH] build(compose): adapt compose file for Coolify deployment Drop container_name and the local image tag, which conflict with Coolify's own container and image naming, and expose the configured app port without publishing it. Document the Coolify file storage for config.yml. --- README.md | 2 ++ compose.yml | 17 +++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 38e7051..7a1f646 100644 --- a/README.md +++ b/README.md @@ -81,6 +81,8 @@ cp config.example.yml config.yml docker compose up -d --build ``` +`compose.yml` also deploys on Coolify with the Docker Compose build pack (compose file `/compose.yml`). Coolify turns the `./config.yml` bind mount into an editable file storage; paste your config there. Keep the real `config.yml` out of git, since it holds datastore credentials. + ## Quick start (Docker) ```bash diff --git a/compose.yml b/compose.yml index 82925ee..a17ca2a 100644 --- a/compose.yml +++ b/compose.yml @@ -2,8 +2,21 @@ services: keepalive: build: context: . - image: keepalive:local - container_name: keepalive restart: unless-stopped + # keepalive reads no environment variables: every setting lives in the + # config file below. Coolify still injects its dashboard variables through + # its generated .env, so nothing needs declaring here. + # + # The app has no HTTP server. `expose` only mirrors the port the Coolify + # app was configured with; it publishes nothing on the host, and nothing + # answers on it. + expose: + - "3000" + # The app reads /config.yml (see config.go). Coolify turns this bind mount + # into an editable file storage; locally, copy config.example.yml to + # config.yml first. The real config holds datastore credentials, so never + # commit it. volumes: - ./config.yml:/config.yml:ro + # No healthcheck: the distroless image ships no shell or HTTP client to + # run one, and the Dockerfile defines none.