-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
79 lines (73 loc) · 1.78 KB
/
docker-compose.yml
File metadata and controls
79 lines (73 loc) · 1.78 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
version: '3.8'
services:
auth-db:
image: postgres:13-alpine
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: authpass
POSTGRES_DB: auth_db
ports:
- "5432:5432"
volumes:
- auth-db-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
auth-service:
build:
context: ./auth-service
dockerfile: Dockerfile
ports:
- "8080:8080"
environment:
DB_DSN: "postgres://postgres:authpass@auth-db:5432/auth_db?sslmode=disable"
INTERNAL_KEY: "c388f25e7cd798fb5cf34c1c97232332096f5d86a8d916df5d8c29d8ba5e3ef2"
depends_on:
auth-db:
condition: service_healthy
main-service-db:
image: postgres:13-alpine
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: mainpass
POSTGRES_DB: main_db
ports:
- "5433:5432"
volumes:
- main-db-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
main-service:
build:
context: ./main-service
dockerfile: Dockerfile
ports:
- "8081:8081"
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://main-service-db:5432/main_db
SPRING_DATASOURCE_USERNAME: postgres
SPRING_DATASOURCE_PASSWORD: mainpass
SPRING_SQL_INIT_MODE: always
depends_on:
main-service-db:
condition: service_healthy
frontend:
build:
context: ./frontend-service
dockerfile: Dockerfile
ports:
- "3000:3000"
volumes:
- ./frontend-service:/app
- /app/node_modules
depends_on:
- auth-service
- main-service
volumes:
auth-db-data:
main-db-data: