-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose-test.yaml
58 lines (51 loc) · 1.26 KB
/
docker-compose-test.yaml
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
version: '3'
services:
pg:
image: postgres:11.2-alpine
environment:
POSTGRES_USER: 'docker'
POSTGRES_PASSWORD: 'docker'
POSTGRES_DB: 'docker'
redis:
image: redis
api:
# image: bigyin13/api-main
build:
dockerfile: ./api/Dockerfile
context: .
depends_on:
- "pg"
- "auth"
ports:
- 3001:3001
environment:
- DATABASE_URL=postgres://docker:docker@pg:5432/docker?sslmode=disable
- AUTHSERVICE_URL=auth:3333
- PORT_API_URL=:3001
command: /bin/sh -c "./wait-for-it.sh pg:5432 && ./wait-for-it.sh auth:3333 && ./bin/api"
auth:
build:
dockerfile: ./auth/Dockerfile
context: .
depends_on:
- "redis"
ports:
- 3333:3333
environment:
- REDIS_URL=redis://:@redis:6379
- PORT_AUTH_URL=:3333
command: /bin/sh -c "./wait-for-it.sh redis:6379 && ./bin/auth"
game:
build:
dockerfile: ./game/Dockerfile
context: .
depends_on:
- "pg"
- "auth"
ports:
- 3002:3002
environment:
- DATABASE_URL=postgres://docker:docker@pg:5432/docker?sslmode=disable
- AUTHSERVICE_URL=auth:3333
- PORT_GAME_URL=:3002
command: /bin/sh -c "./wait-for-it.sh redis:6379 && ./bin/auth"