-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
49 lines (44 loc) · 958 Bytes
/
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
version: '3.2'
services:
api01: &api
build: .
env_file:
- .env
depends_on:
- db
- redis
network_mode: bridge
api02:
<<: *api
env_file:
- .env
nginx:
image: nginx:latest
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- api01
- api02
network_mode: bridge
db:
image: postgres
hostname: db
env_file:
- .env
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
- ./postgresql.conf:/docker-entrypoint-initdb.d/postgresql.conf
command: postgres -c config_file=/docker-entrypoint-initdb.d/postgresql.conf
network_mode: bridge
healthcheck:
test: [ "CMD-SHELL", "pg_isready" ]
interval: 5s
timeout: 5s
retries: 20
redis:
image: redis
hostname: redis
env_file:
- .env
network_mode: bridge
command: redis-server --save "" --appendonly no --maxclients 20000