diff --git a/docker-compose.yml b/docker-compose.yml index 1d881fe..4aaa129 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ version: '3.8' services: # Git sync container - pulls code on startup git-sync: - image: alpine/git:latest + image: alpine:latest container_name: geofeed-git-sync environment: GIT_REPO: ${GIT_REPO:-https://git.prpl.tools/PurpleComputing/geofeed-manager.git} @@ -11,17 +11,19 @@ services: volumes: - webapp_code:/app - db_init:/db-init - command: > - sh -c " - echo 'Cloning repository...' && - rm -rf /app/* /app/.[!.]* 2>/dev/null || true && - rm -rf /db-init/* 2>/dev/null || true && - git clone --depth 1 --branch $${GIT_BRANCH} $${GIT_REPO} /tmp/repo && - cp -r /tmp/repo/webapp/* /app/ && - cp /tmp/repo/database/schema.sql /db-init/01-schema.sql && - chmod -R 755 /app && - echo 'Code sync complete!' - " + command: + - sh + - -c + - | + apk add --no-cache git + echo "Cloning repository..." + rm -rf /app/* /app/.[!.]* 2>/dev/null || true + rm -rf /db-init/* 2>/dev/null || true + git clone --depth 1 --branch $$GIT_BRANCH $$GIT_REPO /tmp/repo + cp -r /tmp/repo/webapp/* /app/ + cp /tmp/repo/database/schema.sql /db-init/01-schema.sql + chmod -R 755 /app + echo "Code sync complete!" networks: - geofeed-network @@ -105,4 +107,4 @@ volumes: networks: geofeed-network: - driver: bridge + driver: bridge \ No newline at end of file