-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
68 lines (63 loc) · 2.15 KB
/
docker-compose.prod.yml
File metadata and controls
68 lines (63 loc) · 2.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# ═══════════════════════════════════════════════════════════
# PayPol Protocol — Production Docker Compose
# Domain: paypol.xyz | VPS: 37.27.190.158 (Hetzner)
# ═══════════════════════════════════════════════════════════
services:
# ── Dashboard (Next.js 16) ──────────────────────────────
dashboard:
build:
context: ./apps/dashboard
dockerfile: Dockerfile
container_name: paypol-dashboard
restart: always
env_file:
- ./apps/dashboard/.env.production
environment:
- NODE_ENV=production
- PORT=3000
- HOSTNAME=0.0.0.0
volumes:
- dashboard_data:/app/prisma
expose:
- "3000"
networks:
- paypol-net
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# ── Nginx (Reverse Proxy + SSL) ─────────────────────────
nginx:
image: nginx:alpine
container_name: paypol-nginx
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- ./deploy/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
- ./deploy/nginx/conf.d:/etc/nginx/conf.d:ro
- /etc/letsencrypt:/etc/letsencrypt:ro
- /var/www/certbot:/var/www/certbot:ro
depends_on:
dashboard:
condition: service_healthy
networks:
- paypol-net
# ── Certbot (Let's Encrypt SSL) ─────────────────────────
certbot:
image: certbot/certbot
container_name: paypol-certbot
volumes:
- /etc/letsencrypt:/etc/letsencrypt
- /var/www/certbot:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
networks:
- paypol-net
volumes:
dashboard_data:
networks:
paypol-net:
driver: bridge