Files
site-slavic-pulse-com/docker-compose-example/docker-compose.yml
T
tomasz-syn-grzegorza d565f83490 init: static frontend for agency-ai.dev — nginx + YouTube intro video
Static landing page served via nginx 1.27 Alpine container.
Features:
- Fullscreen background image visible from first paint
- YouTube intro video overlay (iframe API, lazy loaded)
- PWA manifest with favicons (48x48, 180x180, 512x512)
- SEO meta tags (OG, Twitter Cards, canonical URL)
- Safety timeout: falls back to static image if YouTube fails

Infrastructure:
- Dockerfile: nginx 1.27 Alpine with custom default.conf
  (gzip, cache headers, security headers X-Frame-Options/nosniff)
- docker-compose.yml: local dev on FRONTEND_PORT (default 8080)
- docker-compose-example/: Dokploy deployment via runtime git clone
  from Gitea, resource limits (256M RAM, 0.5 CPU)

Files:
- index.html: main page with inline CSS + JS (YouTube iframe API)
- default.conf: nginx config (gzip, caching, security headers)
- site.webmanifest: PWA manifest
- assets/imgs/: background image + favicons
- .env.example: FRONTEND_PORT template
2026-06-26 08:55:39 +00:00

48 lines
1.6 KiB
YAML

# ============================================================
# Agencja AI - 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: agencja-ai-frontend
restart: unless-stopped
ports:
- "${FRONTEND_PORT:-8080}:80"
command: >
sh -c "
apk add --no-cache git &&
rm -rf /app &&
git clone https://gitea.expert-it.agency-ai.dev/tomasz-syn-grzegorza/site-agency-ai-dev.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 &&
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