-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
133 lines (123 loc) · 3.2 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
services:
adminer:
image: adminer
restart: always
ports:
- 8080:8080
depends_on:
- voicevista-db
environment:
ADMINER_DEFAULT_SERVER: voicevista-db
networks:
- voicevista-network
voicevista-db:
image: postgres:13
volumes:
- pg_data:/var/lib/postgresql/data
- ./create_databases.sh:/docker-entrypoint-initdb.d/create_databases.sh
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: example
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres']
interval: 10s
retries: 5
networks:
- voicevista-network
auth-service:
build:
context: ./authService
command: ['sh', './start.sh']
ports:
- '8003:8000'
environment:
POSTGRES_DB: voicevista
POSTGRES_USER: postgres
POSTGRES_PASSWORD: example
DB_HOST: voicevista-db
DB_PORT: 5432
depends_on:
voicevista-db:
condition: service_healthy
volumes:
- ./authService:/app
networks:
- voicevista-network
kong-migrations:
image: kong:3.8.0
command: ['kong', 'migrations', 'bootstrap']
environment:
KONG_DATABASE: postgres
KONG_PG_HOST: voicevista-db
KONG_PG_USER: postgres
KONG_PG_PASSWORD: example
KONG_PG_DATABASE: kong
depends_on:
voicevista-db:
condition: service_healthy
networks:
- voicevista-network
api-gateway:
image: kong:3.8.0
ports:
- '8000:8000'
- '8001:8001'
- '8002:8002'
- '8443:8443'
- '8444:8444'
depends_on:
voicevista-db:
condition: service_healthy
kong-migrations:
condition: service_completed_successfully
environment:
KONG_DATABASE: postgres
KONG_PG_HOST: voicevista-db
KONG_PG_USER: postgres
KONG_PG_PASSWORD: example
KONG_PG_DATABASE: kong
KONG_ADMIN_LISTEN: '0.0.0.0:8001, 0.0.0.0:8444 ssl'
# KONG_DECLARATIVE_CONFIG: /etc/kong/kong.yml
networks:
- voicevista-network
# volumes:
# - ./kong.yml:/etc/kong/kong.yml
# frontend:
# build:
# context: ./voicevista-frontend
# ports:
# - '3000:80'
# depends_on:
# - api-gateway
# message-queue:
# image: rabbitmq:3-management
# ports:
# - '5672:5672'
# - '15672:15672'
# environment:
# RABBITMQ_DEFAULT_USER: user
# RABBITMQ_DEFAULT_PASS: password
# messaging-service:
# image: your-messaging-service-image
# ports:
# - '8080:8080'
# environment:
# SPRING_DATASOURCE_URL: jdbc:postgresql://voicevista-db:5432/voicevista
# SPRING_DATASOURCE_USERNAME: postgres
# SPRING_DATASOURCE_PASSWORD: example
kong-init:
image: curlimages/curl:latest
depends_on:
- api-gateway
command: >
sh -c "
until curl -s -X POST http://api-gateway:8001/services/ --data 'name=auth-service' --data 'url=http://auth-service:8000'; do sleep 2; done &&
curl -s -X POST http://api-gateway:8001/services/auth-service/routes --data 'paths[]=/auth' --data 'strip_path=true' --data 'name=auth-route'
"
networks:
- voicevista-network
networks:
voicevista-network:
volumes:
pg_data:
konga_data: