Files
site-agencja-ai-com/docker-compose-example/docker-compose.yml
T
tomasz-syn-grzegorza 808c39d838 Configure agencja-ai.com deployment and local dev environment.
Separate container name and port 8081 for parallel dev, add docker-compose.dev.yml
with volume mounts, and point Dokploy example to site-agencja-ai-com Gitea repo.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-26 14:11:49 +02:00

48 lines
1.7 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-com-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-agencja-ai-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 &&
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