- B1: Next.js 15 + Payload CMS 3.0 + Postgres 16, ESLint, Prettier, Husky, Vitest - B2: 9 collections, 6 globals, 12 Page Builder blocks, access control, slugify/revalidate hooks - B3: ezy.com.ua payments, Binotel HMAC webhook, leads API, Telegram bot, Resend email, rate limiting - B4: Tariffs collection with ezy API sync (cron + manual), dynamic pricing source-of-truth - B5: 13 test files covering unit libs and all API routes - B6: Dockerfile multi-stage, docker-compose.prod.yml, nginx.conf SSL, GitHub Actions CI/CD, health endpoint - B7: docs/admin-guide-ua.md (marketer guide), docs/deploy.md (VPS instructions), README quickstart Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
70 lines
1.8 KiB
YAML
70 lines
1.8 KiB
YAML
services:
|
|
postgres:
|
|
image: postgres:16-alpine
|
|
environment:
|
|
POSTGRES_USER: shumiland
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
POSTGRES_DB: shumiland
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ['CMD-SHELL', 'pg_isready -U shumiland']
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
restart: unless-stopped
|
|
|
|
app:
|
|
image: ghcr.io/aimpress/shumiland:${TAG:-latest}
|
|
env_file: .env.production
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
restart: unless-stopped
|
|
|
|
nginx:
|
|
image: nginx:alpine
|
|
ports:
|
|
- '80:80'
|
|
- '443:443'
|
|
volumes:
|
|
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
|
- ./certbot/conf:/etc/letsencrypt:ro
|
|
- ./certbot/www:/var/www/certbot:ro
|
|
depends_on:
|
|
- app
|
|
restart: unless-stopped
|
|
|
|
certbot:
|
|
image: certbot/certbot
|
|
volumes:
|
|
- ./certbot/conf:/etc/letsencrypt
|
|
- ./certbot/www:/var/www/certbot
|
|
command: >-
|
|
certonly --webroot
|
|
--webroot-path=/var/www/certbot
|
|
--email ${CERTBOT_EMAIL}
|
|
--agree-tos
|
|
--no-eff-email
|
|
-d ${CERTBOT_DOMAIN}
|
|
|
|
pg_backup:
|
|
image: alpine:3
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data:ro
|
|
- ./backups:/backups
|
|
environment:
|
|
POSTGRES_USER: shumiland
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
POSTGRES_DB: shumiland
|
|
POSTGRES_HOST: postgres
|
|
command: >-
|
|
sh -c "apk add --no-cache postgresql-client &&
|
|
echo '0 3 * * * pg_dump postgresql://$$POSTGRES_USER:$$POSTGRES_PASSWORD@$$POSTGRES_HOST/$$POSTGRES_DB | gzip > /backups/shumiland_$$(date +\%Y\%m\%d_\%H\%M\%S).sql.gz && find /backups -mtime +14 -delete' | crontab - &&
|
|
crond -f"
|
|
depends_on:
|
|
- postgres
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
postgres_data:
|