-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathall-services-compose.yaml
158 lines (148 loc) · 3.92 KB
/
all-services-compose.yaml
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
networks:
monitoring:
driver: bridge
volumes:
prometheus_data: {}
grafana-storage: {}
services:
auth_microservice:
build:
context: ./
dockerfile: ./build/services/auth/Dockerfile
ports:
- "127.0.0.1:8082:8000"
restart: unless-stopped
volumes:
- ./configs/:/build/configs
depends_on:
db_postgresql:
condition: service_started
restart: true
redis:
condition: service_started
restart: true
networks:
- monitoring
compress_microservice:
build:
context: ./
dockerfile: ./build/services/compress_microservice/Dockerfile
ports:
- "127.0.0.1:8083:8000"
restart: unless-stopped
volumes:
- ./configs/:/build/configs
- ${MEDIA_DIR}:/build/media/Uncompressed
- ${COMPRESSED_MEDIA_DIR}:/build/media/Compressed
networks:
- monitoring
notifications_microservice:
build:
context: ./
dockerfile: ./build/services/notifications/Dockerfile
env_file:
- .env
ports:
- "127.0.0.1:8084:8062"
restart: unless-stopped
volumes:
- ./configs/:/build/configs
- ${HOST_TLS_CERTIFICATE_DIR}:/build/tls
depends_on:
db_postgresql:
condition: service_started
restart: true
networks:
- monitoring
main_service:
build:
context: ./
dockerfile: ./build/services/app/Dockerfile
env_file:
- .env
ports:
- "127.0.0.1:8081:8081"
restart: unless-stopped
volumes:
- ./configs/:/build/configs
- ${MEDIA_DIR}:/build/media
- ${CV_PDF_DIR}:/build/media/CVinPDF
- ${TEMPLATES_DIR}:/build/templates
- ${HOST_TLS_CERTIFICATE_DIR}:/build/tls:ro
depends_on:
db_postgresql:
condition: service_started
restart: true
networks:
- monitoring
redis:
image: redis:latest
environment:
- REDIS_PASSWORD=${REDIS_PASSWORD}
- REDIS_USER=${REDIS_USER}
- REDIS_USER_PASSWORD=${REDIS_USER_PASSWORD}
volumes:
- /var/lib/redis_data:/data
command: >
sh -c '
mkdir -p /usr/local/etc/redis &&
echo "bind 0.0.0.0" > /usr/local/etc/redis/redis.conf &&
echo "requirepass $REDIS_PASSWORD" >> /usr/local/etc/redis/redis.conf &&
echo "appendonly yes" >> /usr/local/etc/redis/redis.conf &&
echo "appendfsync everysec" >> /usr/local/etc/redis/redis.conf &&
echo "user default on nopass ~* +@all" > /usr/local/etc/redis/users.acl &&
echo "user $REDIS_USER on >$REDIS_USER_PASSWORD ~* +@all" >> /usr/local/etc/redis/users.acl &&
redis-server /usr/local/etc/redis/redis.conf --aclfile /usr/local/etc/redis/users.acl
'
restart: unless-stopped
networks:
- monitoring
db_postgresql:
build:
context: ./
dockerfile: ./build/db/Dockerfile
ports:
- "127.0.0.1:8086:5432"
restart: unless-stopped
shm_size: 256mb
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_SCHEMA: ${POSTGRES_SCHEMA}
volumes:
- /var/lib/postgresql/container_data:/var/lib/postgresql
networks:
- monitoring
node_exporter:
image: quay.io/prometheus/node-exporter:latest
command:
- "--path.rootfs=/host"
pid: host
restart: unless-stopped
volumes:
- "/proc:/host/proc:ro"
- "/sys:/host/sys:ro"
- "/:/rootfs:ro"
networks:
- monitoring
prometheus:
image: prom/prometheus:latest
ports:
- "127.0.0.1:9090:9090"
volumes:
- "./configs/:/etc/prometheus"
- "prometheus_data:/prometheus"
command:
- "--config.file=/etc/prometheus/prometheus.yml"
networks:
- monitoring
grafana:
image: grafana/grafana
restart: unless-stopped
volumes:
- grafana-storage:/var/lib/grafana
ports:
- "127.0.0.1:3000:3000"
networks:
- monitoring