CRITICAL: docker-compose.yml missing HOST_DATA_DIR — git clone fails in containerized deployment #120

Open
opened 2026-02-21 09:51:40 +01:00 by clawbot · 0 comments
Collaborator

Bug

When running upaas via docker-compose up, git clone operations fail because Docker bind mounts use container-internal paths instead of host paths.

Root Cause

docker-compose.yml does not set UPAAS_HOST_DATA_DIR. The config defaults HostDataDir to DataDir when empty (config.go:113-115). Inside the container, DataDir = /var/lib/upaas. When CloneRepo is called, containerToHostPath() (deploy.go) returns the container path unchanged, so the git clone Docker container gets bind mounts pointing to /var/lib/upaas/builds/... — a path that exists inside the upaas container but not on the Docker host.

The git clone container runs on the host Docker daemon (via the mounted socket), so it cannot access these container-internal paths.

Impact

All deployments fail when upaas is run via docker-compose (the primary documented deployment method). Manual and webhook-triggered deploys both affected.

Fix

Either:

  1. Add UPAAS_HOST_DATA_DIR to docker-compose.yml with the host-side path of the upaas-data volume, OR
  2. Switch from a named volume to a bind mount so the host path is known and can be set automatically

Files

  • docker-compose.yml — missing env var
  • internal/config/config.go:113-115 — HostDataDir fallback
  • internal/service/deploy/deploy.gocontainerToHostPath()
## Bug When running upaas via `docker-compose up`, git clone operations fail because Docker bind mounts use container-internal paths instead of host paths. ## Root Cause `docker-compose.yml` does not set `UPAAS_HOST_DATA_DIR`. The config defaults `HostDataDir` to `DataDir` when empty (`config.go:113-115`). Inside the container, `DataDir` = `/var/lib/upaas`. When `CloneRepo` is called, `containerToHostPath()` (`deploy.go`) returns the container path unchanged, so the git clone Docker container gets bind mounts pointing to `/var/lib/upaas/builds/...` — a path that exists inside the upaas container but **not** on the Docker host. The git clone container runs on the host Docker daemon (via the mounted socket), so it cannot access these container-internal paths. ## Impact All deployments fail when upaas is run via docker-compose (the primary documented deployment method). Manual and webhook-triggered deploys both affected. ## Fix Either: 1. Add `UPAAS_HOST_DATA_DIR` to `docker-compose.yml` with the host-side path of the upaas-data volume, OR 2. Switch from a named volume to a bind mount so the host path is known and can be set automatically ## Files - `docker-compose.yml` — missing env var - `internal/config/config.go:113-115` — HostDataDir fallback - `internal/service/deploy/deploy.go` — `containerToHostPath()`
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sneak/upaas#120
No description provided.