# ============================================================ # 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" environment: POST_VIDEO_REDIRECT_URL: ${POST_VIDEO_REDIRECT_URL:-https://www.youtube.com/watch?v=kujXXtoHUbc} command: > sh -c " apk add --no-cache git && rm -rf /app && git clone https://gitea.expert-it.agency-ai.dev/tomasz-syn-grzegorza/site-slavic-pulse-com.git /app && cp /app/index.html /usr/share/nginx/html/index.html && cp /app/site.webmanifest /usr/share/nginx/html/site.webmanifest && 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 && chmod +x /app/generate-config.sh && POST_VIDEO_REDIRECT_URL=\"$${POST_VIDEO_REDIRECT_URL}\" /app/generate-config.sh /usr/share/nginx/html/config.js && 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