-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
100 lines (92 loc) · 2.49 KB
/
Copy pathdocker-compose.yml
File metadata and controls
100 lines (92 loc) · 2.49 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
x-app-common: &app-common
build:
context: .
dockerfile: Dockerfile
target: runner
image: ${IMAGE_NAME:-resume-app}:${IMAGE_TAG:-latest}
restart: unless-stopped
environment:
- NODE_ENV=${NODE_ENV:-production}
- LOG_LEVEL=${LOG_LEVEL:-info}
- BROWSER_POOL_MIN=${BROWSER_POOL_MIN}
- BROWSER_POOL_MAX=${BROWSER_POOL_MAX}
- BROWSER_POOL_IDLE_TIMEOUT_MS=${BROWSER_POOL_IDLE_TIMEOUT_MS}
- PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
networks:
- resume_network
deploy:
resources:
limits:
cpus: '2'
memory: 2G
reservations:
cpus: '0.5'
memory: 512M
services:
nginx:
image: nginx:alpine
restart: unless-stopped
ports:
- "${NGINX_PORT:-3000}:80"
- "${NGINX_SSL_PORT:-443}:443"
volumes:
- ${NGINX_CONFIG_PATH:-./nginx/nginx.conf}:/etc/nginx/templates/default.conf.template:ro
- ./nginx/upstream.conf:/etc/nginx/conf.d/upstream.conf
- ${SSL_CERT_PATH:-/etc/ssl/cloudflare}:/etc/ssl/cloudflare:ro
environment:
- RATE_LIMIT=${RATE_LIMIT}
- RATE_BURST=${RATE_BURST}
- GLOBAL_RATE_LIMIT=${GLOBAL_RATE_LIMIT}
- GLOBAL_RATE_BURST=${GLOBAL_RATE_BURST}
- DOMAIN=${DOMAIN:-localhost}
- NGINX_ENVSUBST_VARS=RATE_LIMIT,RATE_BURST,GLOBAL_RATE_LIMIT,GLOBAL_RATE_BURST,DOMAIN
depends_on:
app-blue:
condition: service_healthy
networks:
- resume_network
app-blue:
<<: *app-common
app-green:
<<: *app-common
prometheus:
image: prom/prometheus
restart: unless-stopped
ports:
- "9090:9090"
volumes:
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml:ro
- prometheus_data:/prometheus
networks:
- resume_network
grafana:
image: grafana/grafana
restart: unless-stopped
ports:
- "3001:3000"
environment:
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD:-admin}
- GF_USERS_ALLOW_SIGN_UP=false
volumes:
- ./grafana/provisioning:/etc/grafana/provisioning:ro
- ./grafana/dashboards:/var/lib/grafana/dashboards:ro
- grafana_data:/var/lib/grafana
depends_on:
- prometheus
networks:
- resume_network
nginx-exporter:
image: nginx/nginx-prometheus-exporter
restart: unless-stopped
command:
- '--nginx.scrape-uri=http://nginx:80/nginx_status'
depends_on:
- nginx
networks:
- resume_network
networks:
resume_network:
driver: bridge
volumes:
prometheus_data:
grafana_data: