Files
site-slavic-pulse-com/docker-compose-example/docker-compose.yml
T
tomasz-syn-grzegorza 930e18d761 Align Dokploy compose with Traefik: expose port 80 only, no host mapping.
Remove FRONTEND_PORT from deployment compose; document Container Port 80 in Dokploy UI and clarify Gitea OAuth vs runtime git clone auth.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-27 15:31:07 +02:00

56 lines
1.9 KiB
YAML

# ============================================================
# Slavic Pulse - Docker Compose (Dokploy / manual)
# ============================================================
# Dokploy + Traefik: NIE mapuj portu na hosta (ports:).
# W UI Dokploy ustaw domenę i Container Port = 80 — Traefik routuje po FQDN.
# Wewnętrznie nginx nasłuchuje na :80 (expose poniżej).
#
# Runtime git clone — repozytorium musi być publiczne LUB ustaw GITEA_REPO_URL w .env
# (patrz README — prywatne repo bez tokenu = exit 128, restart loop).
# ============================================================
services:
frontend:
image: nginx:1.27-alpine
container_name: slavic-pulse-com-frontend
restart: unless-stopped
expose:
- "80"
env_file:
- .env
command: >
sh -ce "
echo '[slavic-pulse] Installing git + gettext...' &&
apk add --no-cache git gettext &&
echo '[slavic-pulse] Cloning repo...' &&
rm -rf /app &&
git clone --depth 1 \"$${GITEA_REPO_URL:-https://gitea.expert-it.agency-ai.dev/tomasz-syn-grzegorza/site-slavic-pulse-com.git}\" /app &&
echo '[slavic-pulse] Generating index.html from .env...' &&
chmod +x /app/generate-from-env.sh &&
TEMPLATE_DIR=/app /app/generate-from-env.sh /usr/share/nginx/html &&
echo '[slavic-pulse] Copying assets and nginx config...' &&
cp -r /app/assets /usr/share/nginx/html/assets &&
rm -f /etc/nginx/conf.d/default.conf &&
cp /app/default.conf /etc/nginx/conf.d/default.conf &&
echo '[slavic-pulse] Starting nginx...' &&
nginx -g 'daemon off;'
"
healthcheck:
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:80/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
deploy:
resources:
limits:
memory: 256M
cpus: "0.5"
reservations:
memory: 64M