-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
102 lines (96 loc) · 2.51 KB
/
docker-compose.yml
File metadata and controls
102 lines (96 loc) · 2.51 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
101
102
services:
app:
image: dongho18/connect-gnu-node:latest
pull_policy: always
restart: always
expose:
- '3000'
env_file:
- .env
networks:
- connect-gnu-network
logging:
driver: gcplogs
options:
gcp-log-cmd: 'true'
nginx:
image: nginx:1.29.5-alpine
restart: always
ports:
- '80:80'
- '443:443'
volumes:
- ./infra/nginx/prod.conf:/etc/nginx/conf.d/default.conf
- ./infra/certbot/conf:/etc/letsencrypt
- ./infra/certbot/www:/var/www/certbot
command: '/bin/sh -c ''while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g "daemon off;"'''
networks:
- connect-gnu-network
depends_on:
- app
logging:
driver: gcplogs
options:
gcp-log-cmd: 'true'
prometheus:
image: prom/prometheus:v3.10.0
restart: always
expose:
- '9090'
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.external-url=${PROMETHEUS_EXTERNAL_URL}'
- '--web.route-prefix=/'
volumes:
- ./infra/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus_data:/prometheus
networks:
- connect-gnu-network
depends_on:
- app
logging:
driver: gcplogs
options:
gcp-log-cmd: 'true'
grafana:
image: grafana/grafana:12.3
restart: always
expose:
- '3000'
environment:
- GF_SECURITY_ADMIN_USER=${GF_SECURITY_ADMIN_USER}
- GF_SECURITY_ADMIN_PASSWORD=${GF_SECURITY_ADMIN_PASSWORD}
- GF_SERVER_ROOT_URL=${GF_SERVER_ROOT_URL}
- GF_SERVER_SERVE_FROM_SUB_PATH=true
volumes:
- grafana_data:/var/lib/grafana
- ./infra/grafana/provisioning/datasources:/etc/grafana/provisioning/datasources
- ./infra/grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards
networks:
- connect-gnu-network
depends_on:
- prometheus
logging:
driver: json-file
options:
max-size: '10m'
max-file: '3'
certbot:
image: certbot/certbot:v5.3.1
restart: on-failure
volumes:
- ./infra/certbot/conf:/etc/letsencrypt
- ./infra/certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
logging:
driver: json-file
options:
max-size: '10m'
max-file: '3'
networks:
connect-gnu-network:
driver: bridge
volumes:
prometheus_data:
grafana_data: