-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
145 lines (136 loc) · 3.19 KB
/
docker-compose.yml
File metadata and controls
145 lines (136 loc) · 3.19 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
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
version: '3.8'
services:
postgres:
image: postgres:16
container_name: deeptechhub-postgres
env_file: .env
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD_FILE: /run/secrets/db_password
secrets:
- db_password
volumes:
- postgres_data:/var/lib/postgresql/data
- ./init-scripts:/docker-entrypoint-initdb.d
ports:
- "5432:5432"
networks:
- deeptechhub-network
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U ${POSTGRES_USER}" ]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:alpine
ports:
- "6379:6379"
networks:
- deeptechhub-network
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
identity-service:
build:
context: ./identity-service
container_name: identity-service
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
env_file: .env
environment:
SPRING_PROFILES_ACTIVE: "docker"
DB_HOST: postgres
DB_PORT: 5432
DB_NAME: ${IDENTITY_DB_NAME}
DB_USER: ${POSTGRES_USER}
secrets:
- db_password
- jwt_secret
- gmail_pass
volumes:
- ./secrets:/run/secrets:ro
ports:
- "8081:8081"
networks:
- deeptechhub-network
task-service:
build:
context: ./task-service
container_name: task-service
depends_on:
postgres:
condition: service_healthy
identity-service:
condition: service_started
env_file: .env
environment:
SPRING_PROFILES_ACTIVE: "docker"
DB_HOST: postgres
DB_PORT: 5432
DB_NAME: ${TASK_DB_NAME}
DB_USER: ${POSTGRES_USER}
DB_PASSWORD_FILE: /run/secrets/db_password
DTH_JWT_SECRET_FILE: /run/secrets/jwt_secret
IDENTITY_SERVICE_URL: http://identity-service:8081
secrets:
- db_password
- jwt_secret
- gmail_pass
ports:
- "8082:8082"
networks:
- deeptechhub-network
api-gateway:
build:
context: ./api-gateway
container_name: api-gateway
depends_on:
identity-service:
condition: service_started
task-service:
condition: service_started
environment:
SPRING_PROFILES_ACTIVE: "docker"
SERVER_PORT: "8070"
IDENTITY_SERVICE_URL: http://identity-service:8081
TASK_SERVICE_URL: http://task-service:8082
JWT_SECRET_FILE: /run/secrets/jwt_secret
secrets:
- jwt_secret
volumes:
- ./secrets:/run/secrets:ro
ports:
- "8070:8070"
networks:
- deeptechhub-network
pgadmin:
image: dpage/pgadmin4
container_name: pgadmin4
env_file: .env
environment:
PGADMIN_DEFAULT_EMAIL: admin@admin.com
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PWD}
ports:
- "6070:80"
depends_on:
- postgres
networks:
- deeptechhub-network
volumes:
postgres_data:
secrets:
db_password:
file: ./secrets/db_password.txt
jwt_secret:
file: ./secrets/jwt_secret.txt
gmail_pass:
file: ./secrets/gmail_pass.txt
networks:
deeptechhub-network:
driver: bridge