-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
115 lines (108 loc) · 2.42 KB
/
docker-compose.yml
File metadata and controls
115 lines (108 loc) · 2.42 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
103
104
105
106
107
108
109
110
111
112
113
114
115
services:
retrip-app:
image: bumnote/retrip:latest
platform: linux/amd64
container_name: retrip-app
env_file:
- .env
ports:
- "8080:8080"
depends_on:
redis:
condition: service_healthy
environment:
SPRING_PROFILES_ACTIVE: prod
SPRING_DATASOURCE_URL: ${SPRING_DATASOURCE_URL}
SPRING_DATASOURCE_USERNAME: ${SPRING_DATASOURCE_USERNAME}
SPRING_DATASOURCE_PASSWORD: ${SPRING_DATASOURCE_PASSWORD}
SPRING_DATA_REDIS_HOST: redis
SPRING_DATA_REDIS_PORT: 6379
networks:
- retrip-net
restart: always
redis:
image: redis:7
platform: linux/amd64
container_name: retrip-redis
expose:
- ${SPRING_REDIS_PORT}
networks:
- retrip-net
restart: always
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 10s
timeout: 5s
retries: 5
prometheus:
image: prom/prometheus
container_name: prometheus
volumes:
- ./data/prometheus:/prometheus
- ./prometheus.yml:/etc/prometheus/prometheus.yml
depends_on:
- retrip-app
ports:
- "9090:9090"
networks:
- retrip-net
restart: always
extra_hosts:
- "host.docker.internal:host-gateway"
grafana:
image: grafana/grafana
container_name: grafana
env_file:
- .env
ports:
- "3000:3000"
volumes:
- grafana-storage:/var/lib/grafana
depends_on:
- prometheus
networks:
- retrip-net
restart: always
environment:
- GF_SECURITY_ADMIN_USER=${GRAFANA_ADMIN_USER}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD}
nginx:
image: nginx:latest
container_name: nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx/conf.d:/etc/nginx/conf.d
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
depends_on:
- retrip-app
- prometheus
- grafana
networks:
- retrip-net
restart: always
certbot:
image: certbot/certbot
container_name: certbot
env_file:
- .env
volumes:
- ./data/certbot/conf:/etc/letsencrypt
- ./data/certbot/www:/var/www/certbot
depends_on:
- nginx
networks:
- retrip-net
volumes:
grafana-storage:
certbot_data:
networks:
retrip-net:
name: retrip-net
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16
gateway: 172.20.0.1