-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
106 lines (97 loc) · 2.16 KB
/
docker-compose.yml
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
version: '3.8'
networks:
backend:
driver: bridge
services:
postgres:
image: postgres:11.4-alpine
container_name: postgres
ports:
- "5430:5432"
volumes:
- /datastore/pg_data:/var/lib/postgresql/data/pgdata
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PWD}
POSTGRES_DB: tododb
PGDATA: /var/lib/postgresql/data/pgdata
networks:
backend:
aliases:
- "postgres"
restart: on-failure
todoapp:
image: rsh12/todo:0.0.1-SNAPSHOT
ports:
- "8080"
# - 8080:8080
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/tododb
SPRING_DATASOURCE_USERNAME: ${DB_USER}
SPRING_DATASOURCE_PASSWORD: ${DB_PWD}
TOKEN: ${TOKEN}
networks:
backend:
aliases:
- "todoapp"
depends_on:
- postgres
- rabbit
restart: on-failure
rabbit:
image: rabbitmq:3-management-alpine
container_name: rabbitmq
ports:
- "5672:5672"
- "15672:15672"
networks:
backend:
aliases:
- "rabbitmq"
# todo: add password-reset service
prometheus:
image: prom/prometheus
extra_hosts:
- "host.docker.internal:host-gateway"
container_name: todo-prometheus
volumes:
- ./prometheus:/etc/prometheus/
ports:
- "9090:9090"
networks:
backend:
aliases:
- "prometheus"
depends_on:
- todoapp
restart: on-failure
grafana:
image: grafana/grafana
container_name: todo-grafana
depends_on:
- prometheus
volumes:
- ./grafana/:/etc/grafana/
ports:
- "3000:3000"
networks:
backend:
aliases:
- "grafana"
restart: on-failure
web:
image: nginx
container_name: nginx
networks:
backend:
aliases:
- "nginx"
ports:
- "8000:80" # because the 80th port on the local machine is already in use
# - 443:443 # ssl off by default
depends_on:
- todoapp
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
- /etc/nginx/ssl:/etc/nginx/ssl # ssl off by default
restart: always