-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
155 lines (148 loc) · 5.47 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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
version: "3"
services:
###############################################################################
### PostgreSQL Database Definition ###
###############################################################################
pidp-db:
restart: always
container_name: pidpdb
image: postgres:10.6
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USERNAME: postgres
POSTGRES_DB: postgres
ports:
- "5433:5432"
volumes:
- local_pidp_postgress_data:/var/lib/postgresql/data
networks:
- pidp-net
###############################################################################
### PIdP API Backend Definition ###
###############################################################################
pidp-webapi:
container_name: pidp-webapi
restart: always
image: pidp-webapi
build:
context: backend/webapi/
dockerfile: Dockerfile.local
args:
ASPNETCORE_HTTPS_PORT: "5001"
ASPNETCORE_ENVIRONMENT: "Development"
ASPNETCORE_URLS: "http://+:8080"
DOTNET_CLI_HOME: "/tmp/DOTNET_CLI_HOME"
environment:
ASPNETCORE_HTTPS_PORT: "5001"
ASPNETCORE_ENVIRONMENT: "Development"
ASPNETCORE_URLS: "http://+:8080"
DOTNET_CLI_HOME: "/tmp/DOTNET_CLI_HOME"
ConnectionStrings__PidpDatabase: "host=pidpdb;port=5432;database=postgres;username=postgres;password=postgres"
PlrClient__Url: "pidp-plr-intake:8080/api" # Assuming the PLR intake microservice is also running in Docker
volumes:
- ./backend/webapi/:/app
- pidp-webapi-bin:/app/bin
- pidp-webapi-obj:/app/obj
- ${APPDATA}/Microsoft/UserSecrets/5c2dc965-00b4-4531-9ff0-9b37193ead9b:/root/.microsoft/usersecrets/5c2dc965-00b4-4531-9ff0-9b37193ead9b
# Use the following instead if developing on Mac/Linux:
# - ${HOME}/.microsoft/usersecrets/5c2dc965-00b4-4531-9ff0-9b37193ead9b:/root/.microsoft/usersecrets/5c2dc965-00b4-4531-9ff0-9b37193ead9b
ports:
- "5050:8080"
- "5051:5001"
networks:
- pidp-net
depends_on:
- pidp-db
entrypoint: /bin/bash
command: [
"-c",
"echo Waiting for Database...;
sleep 10;
echo \"Running Database Migrations...\";
dotnet ef database update;
echo \"Starting API...\";
dotnet watch run --urls=http://+:8080"
]
###############################################################################
### PLR Intake Definition ###
###############################################################################
pidp-plr-intake:
container_name: pidp-plr-intake
restart: always
image: pidp-plr-intake
build:
context: backend/services.plr-intake/
dockerfile: Dockerfile.local
args:
ASPNETCORE_HTTPS_PORT: "5001"
ASPNETCORE_ENVIRONMENT: "Development"
ASPNETCORE_URLS: "http://+:8080"
DOTNET_CLI_HOME: "/tmp/DOTNET_CLI_HOME"
environment:
ASPNETCORE_HTTPS_PORT: "5001"
ASPNETCORE_ENVIRONMENT: "Development"
ASPNETCORE_URLS: "http://+:8080"
DOTNET_CLI_HOME: "/tmp/DOTNET_CLI_HOME"
ConnectionStrings__PlrDatabase: "host=pidpdb;port=5432;database=postgres;username=postgres;password=postgres"
volumes:
- ./backend/services.plr-intake/:/app
ports:
- "5060:8080"
- "5061:5001"
networks:
- pidp-net
depends_on:
- pidp-db
entrypoint: /bin/bash
command: [
"-c",
"echo Waiting for Database...;
sleep 5;
echo \"Running PLR Database Migrations...\";
dotnet ef database update;
echo \"Starting PLR API...\";
dotnet watch run --urls=http://+:8080"
]
###############################################################################
### Mailhog ###
###############################################################################
mailhog:
container_name: mailhog
restart: always
image: mailhog/mailhog:latest
ports:
- 25:1025
- 1025:1025
- 8025:8025 # Visit localhost:8025 to see the list of captured emails
networks:
- pidp-net
###############################################################################
### Keycloak ###
###############################################################################
keycloak:
container_name: keycloak
image: jboss/keycloak:latest
restart: always
volumes:
- ./realm-export-local.json:/tmp/realm-export.json
environment:
DB_VENDOR: h2
KEYCLOAK_USER: realm-admin
KEYCLOAK_PASSWORD: realm-admin
KEYCLOAK_IMPORT: /tmp/realm-export.json -Dkeycloak.profile.feature.upload_scripts=enabled
ports:
- 9090:8080
profiles: ["full", "keycloak"]
###############################################################################
### Networks Definition ###
###############################################################################
networks:
pidp-net:
driver: bridge
###############################################################################
### Volumes Definition ###
###############################################################################
volumes:
local_pidp_postgress_data: null
pidp-webapi-bin:
pidp-webapi-obj: