-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
48 lines (44 loc) · 1.01 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
version: '3.8'
services:
postgres:
image: postgres:13-alpine
environment:
POSTGRES_USER: dockeruser
POSTGRES_PASSWORD: test
POSTGRES_DB: testdb
healthcheck:
test: [ "CMD-SHELL", "pg_isready", "-d", "db_prod" ]
interval: 30s
timeout: 60s
retries: 5
start_period: 80s
ports:
- "5432:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
graphql-service:
image: graphql-service:latest
container_name: graphql-service
ports:
- "8080:8080"
- "8000:8000"
depends_on:
postgres:
condition: service_healthy
restart: always
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postgres:5432/testdb
SPRING_DATASOURCE_USERNAME: dockeruser
SPRING_DATASOURCE_PASSWORD: test
student-app:
image: student-service:latest
build:
context: .
ports:
- "9090:9090"
- "9000:9000"
restart: always
environment:
SERVER_PORT: 9090
volumes:
postgres-data: