Files
sag24-website/docker-compose.yml
striker b2ca6d3ae7 feat(docker): containerize sag24.ru — multi-stage Next.js build + nginx/php-fpm runtime
Single-container approach (nginx + php-fpm 8.3 + supervisord) to match web.hhivp.com
deployment paradigm (host nginx → docker по порту).

- Dockerfile: builder (node:22-alpine npm ci+next build) → runtime (php:8.3-fpm-alpine)
- docker/nginx.conf: serves static from /var/www/sag24.ru/public_html, fastcgi_pass на 127.0.0.1:9000
- docker/supervisord.conf: запускает php-fpm + nginx
- docker-compose.yml: для деплоя на web в /opt/docker/sites/sag24-ru/, mount contact-config.php read-only
- .dockerignore: исключает node_modules/.git/out из контекста

Container exposes :8080 (бесроутовый bind), маппится на host :4070 на web.
Watchtower label включён (auto-deploy на изменения образа в registry).
2026-05-06 22:20:23 +03:00

21 lines
794 B
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
services:
sag24-ru:
image: registry.hhivp.com/striker/sag24-ru:latest
container_name: sag24-ru
restart: unless-stopped
ports:
- "127.0.0.1:4070:8080"
volumes:
# Секреты для контактной формы — вне образа, монтируется с хоста.
# На web путь: /opt/docker/sites/sag24-ru/secrets/contact-config.php
# contact.php ожидает файл по пути dirname(__DIR__, 2) == /var/www/sag24.ru
- ./secrets/contact-config.php:/var/www/sag24.ru/contact-config.php:ro
labels:
com.centurylinklabs.watchtower.enable: "true"
healthcheck:
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:8080/ru/"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s