add stuff

This commit is contained in:
Purple
2026-01-16 20:51:17 +00:00
parent 5323e383dc
commit e874f976dc

View File

@@ -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