-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
176 lines (175 loc) · 4.79 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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
services:
minio:
image: minio/minio
restart: unless-stopped
environment:
MINIO_ROOT_USER: REDSQUIRREL
MINIO_ROOT_PASSWORD: YELLOWMONKEY
volumes:
- ./data/minio:/data
entrypoint: sh
command: -c 'mkdir -p /data/cannonflea && minio server /data -console-address ":9002"'
ports:
- 9000:9000
- 9002:9002
db:
image: postgis/postgis:15-3.4-alpine
restart: unless-stopped
volumes:
- ./db:/docker-entrypoint-initdb.d
- postgis-data:/var/lib/postgresql/data
ports:
- 5432:5432
environment:
POSTGRES_USER: SPAWNPLOW
POSTGRES_PASSWORD: YELLOWSPATULA
POSTGRES_DB: bdms
healthcheck:
test: "pg_isready -U SPAWNPLOW -d bdms -h db"
interval: 3s
timeout: 1s
retries: 20
start_period: 25s
pgadmin:
image: dpage/pgadmin4
restart: unless-stopped
ports:
- 3001:80
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: PEEVEDWATER
PGADMIN_CONFIG_SERVER_MODE: "False"
PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED: "False"
volumes:
- ./config/pgadmin4-servers.json:/pgadmin4/servers.json
entrypoint:
- /bin/sh
- -c
- |
/bin/echo '*:*:bdms:SPAWNPLOW:YELLOWSPATULA' > /tmp/.pgpass
chmod 0600 /tmp/.pgpass
/entrypoint.sh
depends_on:
db:
condition: service_healthy
client:
build:
context: ./src/client
target: development
args:
- VERSION=0.0.99
- REVISION=dev
volumes:
- .:/app
- /app/src/client/node_modules
ports:
- 3000:3000
depends_on:
db:
condition: service_healthy
environment:
VITE_APP_PROXY_HOST_API: http://localhost:5000/
extra_hosts:
- "localhost:host-gateway"
api-legacy:
build:
context: ./src/api-legacy
args:
- VERSION=0.0.99
- REVISION=dev
restart: unless-stopped
ports:
- 8888:8888
volumes:
- ./src/api-legacy:/usr/src/app/bms
depends_on:
db:
condition: service_healthy
environment:
DB_USERNAME: SPAWNPLOW
DB_PASSWORD: YELLOWSPATULA
DB_DATABASE: bdms
DB_HOST: db
DB_PORT: 5432
api:
build:
context: ./src
dockerfile: api/Dockerfile
target: development
ports:
- 5000:5000
volumes:
- ./src/api:/src
- ./src/Directory.Build.props:/Directory.Build.props
- /src/bin
- /src/obj
depends_on:
db:
condition: service_healthy
healthcheck:
test: "curl --fail http://127.0.0.1:5000/health || exit 1"
interval: 20s
timeout: 10s
retries: 30
start_period: 120s
environment:
ASPNETCORE_HTTP_PORTS: 5000
DOTNET_USE_POLLING_FILE_WATCHER: 1
CONNECTIONSTRINGS__BdmsContext: Host=localhost;Username=SPAWNPLOW;Password=YELLOWSPATULA;Database=bdms;CommandTimeout=300
ReverseProxy__Clusters__pythonApi__Destinations__legacyApi__Address: "http://localhost:8888/"
ReverseProxy__Clusters__dataExtractionApi__Destinations__dataExtractionApi__Address: "http://localhost:8000/"
Auth__Authority: http://localhost:4011
Auth__Audience: "bdms-client"
Auth__GroupClaimType: "local_groups_claim"
Auth__AuthorizedGroupName: "boreholes_dev_group"
Auth__AnonymousModeEnabled: false
S3__ENDPOINT: http://minio:9000
S3__SECURE: 1
extra_hosts:
- "localhost:host-gateway"
dataextraction:
image: ghcr.io/swisstopo/swissgeol-boreholes-dataextraction-api:v1.0.5
restart: unless-stopped
ports:
- 8000:8000
environment:
AWS_ENDPOINT: http://minio:9000
AWS_ACCESS_KEY_ID: REDSQUIRREL
AWS_SECRET_ACCESS_KEY: YELLOWMONKEY
AWS_S3_BUCKET: cannonflea
healthcheck:
test: "curl --fail http://localhost:8000/health || exit 1"
oidc-server:
image: soluto/oidc-server-mock
restart: unless-stopped
ports:
- "4011:80"
environment:
CLIENTS_CONFIGURATION_PATH: /tmp/config/clients-config.json
USERS_CONFIGURATION_PATH: /tmp/config/users-config.json
IDENTITY_RESOURCES_INLINE: |
[
{
"Name": "local_groups_scope",
"ClaimTypes": [
"local_groups_claim"
]
}
]
SERVER_OPTIONS_INLINE: |
{
"IssuerUri": "http://localhost:4011",
"AccessTokenJwtType": "JWT",
"Discovery": {
"ShowKeySet": true
},
"Authentication": {
"CookieSameSiteMode": "Lax",
"CheckSessionCookieSameSiteMode": "Lax"
}
}
volumes:
- ./config/oidc-mock-clients.json:/tmp/config/clients-config.json:ro
- ./config/oidc-mock-users.json:/tmp/config/users-config.json:ro
volumes:
postgis-data: