-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-build.yaml
63 lines (57 loc) · 1.63 KB
/
docker-compose-build.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
58
59
60
61
62
63
# Docker Compose file Reference (https://docs.docker.com/compose/compose-file/)
version: '3.7'
# Define services
services:
# AuthZ service
app-server:
# Configuration for building the docker image for the authz server
build:
context: .
dockerfile: ./oauth2-authorization-server/Dockerfile
args:
# Secrets
client_id: webappclient
client_secret: webappclientsecret
ports:
- "9080:9080" # Forward the exposed port 9080 on the container to port 9080 on the host machine
restart: always
networks:
testing_net:
ipv4_address: 172.28.1.2
# Resource service
app-res:
# Configuration for building the docker image for the client server
build:
context: .
dockerfile: ./oauth2-resource-server/Dockerfile
restart: always
depends_on:
- app-server
networks:
testing_net:
ipv4_address: 172.28.1.3
# Client Service
app-client:
# Configuration for building the docker image for the resource server
build:
context: .
dockerfile: ./oauth2-client/Dockerfile
args:
# Secrets
client_id: webappclient
client_secret: webappclientsecret
ports:
- "9180:9180" # Map the exposed port 9190 on the container to port 9190 on the host machine
restart: always
depends_on:
- app-res
networks:
testing_net:
ipv4_address: 172.28.1.1
# Networks created to facilitate communication between containers
networks:
testing_net:
ipam:
driver: default
config:
- subnet: 172.28.0.0/16