Files
site-slavic-pulse-com/docker-compose-example/docker-compose.yml
T
tomasz-syn-grzegorza 3a843c53f3 Move template assets to .env-driven generation.
Site metadata, images, favicons, and YouTube settings are now configured via .env and rendered from HTML/manifest templates at dev or container startup.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-26 15:45:04 +02:00

51 lines
1.7 KiB
YAML

# ============================================================
# Slavic Pulse - Docker Compose (Dokploy / manual)
# ============================================================
# Dokploy-compatible pattern: uses pre-built image + runtime git clone.
# Dokploy only copies docker-compose.yml + .env to the server, so local
# build context with a Dockerfile does not work. This approach matches
# other working apps on our servers (e.g. wdj-hermes-frontend-matrix).
#
# Port hosta: FRONTEND_PORT z .env (domyślnie 8080) → nginx w kontenerze na porcie 80.
# Dokploy/Traefik routuje po FQDN do wewnętrznego portu 80 kontenera.
# ============================================================
services:
frontend:
image: nginx:1.27-alpine
container_name: slavic-pulse-com-frontend
restart: unless-stopped
ports:
- "${FRONTEND_PORT:-8080}:80"
env_file:
- .env
command: >
sh -c "
apk add --no-cache git gettext &&
rm -rf /app &&
git clone https://gitea.expert-it.agency-ai.dev/tomasz-syn-grzegorza/site-slavic-pulse-com.git /app &&
chmod +x /app/generate-from-env.sh &&
TEMPLATE_DIR=/app /app/generate-from-env.sh /usr/share/nginx/html &&
cp -r /app/assets /usr/share/nginx/html/assets &&
rm /etc/nginx/conf.d/default.conf &&
cp /app/default.conf /etc/nginx/conf.d/default.conf &&
nginx -g 'daemon off;'
"
healthcheck:
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:80/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 45s
deploy:
resources:
limits:
memory: 256M
cpus: "0.5"
reservations:
memory: 64M