-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
136 lines (128 loc) · 3.11 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
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
services:
user:
build:
dockerfile: ./apps/user/Dockerfile
context: .
target: development
command: npm run start:dev user
restart: always
env_file:
- ./apps/user/.development.env
depends_on:
rabbitmq:
condition: service_healthy
user-db:
condition: service_healthy
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
token:
build:
dockerfile: ./apps/token/Dockerfile
context: .
target: development
command: npm run start:dev token
restart: always
env_file:
- ./apps/token/.development.env
depends_on:
rabbitmq:
condition: service_healthy
token-db:
condition: service_healthy
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
gateway:
build:
context: .
dockerfile: ./apps/gateway/Dockerfile
target: development
command: npm run start:dev gateway
restart: always
env_file:
- ./apps/gateway/.development.env
depends_on:
rabbitmq:
condition: service_healthy
user:
condition: service_started
token:
condition: service_started
ports:
- '8080:8080'
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
user-db:
image: postgres:latest
container_name: user-db
restart: always
ports:
- '5432:5432'
environment:
POSTGRES_USER: user_service_user
POSTGRES_PASSWORD: user_service_password
POSTGRES_DB: user_service_db
volumes:
- ./docker-entrypoint-initdb.d/user:/docker-entrypoint-initdb.d
- user_postgres_data:/var/lib/postgresql/data
healthcheck:
test: [ 'CMD-SHELL', 'pg_isready -U user_service_user -d user_service_db' ]
interval: 10s
retries: 5
start_period: 20s
timeout: 5s
token-db:
image: postgres:latest
container_name: token-db
restart: always
ports:
- '5433:5432'
environment:
POSTGRES_USER: token_service_user
POSTGRES_PASSWORD: token_service_password
POSTGRES_DB: token_service_db
volumes:
- ./docker-entrypoint-initdb.d/token:/docker-entrypoint-initdb.d
- token_postgres_data:/var/lib/postgresql/data
healthcheck:
test: [ 'CMD-SHELL', 'pg_isready -U token_service_user -d token_service_db' ]
interval: 10s
retries: 5
start_period: 20s
timeout: 5s
pgadmin:
image: dpage/pgadmin4
container_name: pgadmin
restart: always
ports:
- '5050:80'
environment:
- PGADMIN_DEFAULT_EMAIL=admin@admin.com
- PGADMIN_DEFAULT_PASSWORD=pgadmin4
- PGADMIN_LOG_LEVEL=ERROR
user: '$UID:$GID'
env_file:
- .psql.dev.env
depends_on:
user-db:
condition: service_healthy
token-db:
condition: service_healthy
rabbitmq:
image: rabbitmq
ports:
- '5672:5672'
healthcheck:
test: [ 'CMD', 'rabbitmq-diagnostics', 'ping' ]
interval: 10s
retries: 5
start_period: 20s
timeout: 5s
networks:
default:
driver: bridge
volumes:
user_postgres_data: {}
token_postgres_data: {}