-
Notifications
You must be signed in to change notification settings - Fork 76
/
Copy pathdocker-compose.yml
101 lines (88 loc) · 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
version: '3.7'
services:
jaeger:
image: jaegertracing/all-in-one:latest
networks:
- intranet
ports:
- "5775:5775/udp"
- "6831:6831/udp"
- "6832:6832/udp"
- "5778:5778"
- "16686:16686"
- "14268:14268"
- "9411:9411"
#=============================#
# check migration before start
daemon-migrate:
image: golang-example-app:development
depends_on:
- postgres
networks:
- intranet
command:
migrate up --dsn=postgres://postgres@postgres:5432/golang_example_development?sslmode=disable --limit=0
daemon:
image: golang-example-app:development
command: daemon -c ./configs/docker_development.yaml -d
depends_on:
- product_service
- health_check_service
- daemon-migrate
- postgres
- redis
- nats-streaming
networks:
- intranet
ports:
- "9096:9096"
#=============================#
product_service:
image: golang-example-app:development
command: product-service -c ./configs/docker_development.yaml -d
depends_on:
- postgres
networks:
- intranet
ports:
- "50051:50051"
#=============================#
health_check_service:
image: golang-example-app:development
command: health-check -c ./configs/docker_development.yaml -d
networks:
- intranet
ports:
- "50052:50052"
#=============================#
postgres:
image: postgres:9.6
environment:
- POSTGRES_USER=postgres
- POSTGRES_DB=golang_example_development
- POSTGRES_HOST_AUTH_METHOD=trust
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5532:5432"
networks:
- intranet
redis:
image: redis:latest
volumes:
- redis_data:/data
networks:
- intranet
nats-streaming:
image: nats-streaming
ports:
- "8222:8222"
- "4222:4222"
networks:
- intranet
networks:
intranet:
driver: bridge
volumes:
postgres_data:
redis_data: