-
Notifications
You must be signed in to change notification settings - Fork 116
Expand file tree
/
Copy pathdocker-compose.build.yml
More file actions
65 lines (56 loc) · 1.44 KB
/
docker-compose.build.yml
File metadata and controls
65 lines (56 loc) · 1.44 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
version: '3.1' # specify docker-compose version
services:
nginx-proxy:
image: hantsy/nginx-proxy
container_name: nginx-proxy
build:
context: ./nginx
dockerfile: Dockerfile
depends_on:
- auth-service
- user-service
- post-service
ports:
- "80:80"
auth-service:
image: hantsy/auth-service
container_name: auth-service
build:
context: ./auth-service # specify the directory of the Dockerfile
dockerfile: Dockerfile
environment:
SERVICES_USER_SERVICE_URL: http://user-service:8001
SPRING_REDIS_HOST: redis
ports:
- "8000:8000" #specify ports forewarding
depends_on:
- user-service
- redis
user-service:
image: hantsy/user-service
container_name: user-service
build:
context: ./user-service
dockerfile: Dockerfile
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://userdb:3306/userdb
SPRING_REDIS_HOST: redis
ports:
- "8001:8001" #specify ports forewarding
depends_on:
- userdb
- redis
post-service:
image: hantsy/post-service
container_name: post-service
build:
context: ./post-service
dockerfile: Dockerfile
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://postdb:5432/postdb
SPRING_REDIS_HOST: redis
ports:
- "8002:8002" #specify ports forewarding
depends_on:
- postdb
- redis