-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
164 lines (152 loc) · 5.11 KB
/
docker-compose.yml
File metadata and controls
164 lines (152 loc) · 5.11 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
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
services:
traefik:
image: docker.io/traefik:v2.8
container_name: labelstack-traefik
ports:
- "443:443"
- "8080:8080"
env_file:
- .env
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
command:
- --providers.docker=true
- --providers.docker.exposedbydefault=false
- --accesslog
- --log
- --api
# - --api.insecure=true
- --entrypoints.web-secure.address=:443
labels:
- traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https
- traefik.http.routers.redirs.rule=hostregexp(`{host:.+}`)
- traefik.http.routers.redirs.entrypoints=web
- traefik.http.routers.redirs.middlewares=redirect-to-https
# TODO: commented out due to traefik bug (there is no way to set url prefix for traefik api e.g. /traefik/api)
# - traefik.http.routers.traefik.rule=PathPrefix(`/traefik`)
# - traefik.http.routers.traefik.middlewares=traefik-strip
# - traefik.http.middlewares.traefik-strip.stripprefix.prefixes=/traefik
# - traefik.http.routers.traefik.priority=10
# - traefik.http.routers.traefik.service=api@internal
# - traefik.http.routers.traefik.middlewares=admin
# - traefik.http.routers.traefik.tls=true
# - traefik.http.routers.traefik.entrypoints=web-secure
# - traefik.http.middlewares.admin.basicauth.users=${TRAEFIK_DASHBOARD_USER}:${TRAEFIK_DASHBOARD_PASSWORD}
db:
image: docker.io/postgres:14-alpine
container_name: labelstack-db
volumes:
- app-db-data:${PGDATA}
- ./database/pg-init-scripts:/docker-entrypoint-initdb.d
env_file:
- .env
environment:
- POSTGRES_MULTIPLE_DATABASES=${POSTGRES_APP_DB},${POSTGRES_ORTHANC_DB}
pgadmin:
image: docker.io/dpage/pgadmin4
container_name: labelstack-pgadmin
depends_on:
- db
env_file:
- .env
environment:
- SCRIPT_NAME=/pgadmin
- PGADMIN_DEFAULT_PASSWORD=${PGADMIN_DEFAULT_PASSWORD}
expose:
- "5050"
labels:
- traefik.enable=true
- traefik.http.routers.pg_admin.entrypoints=web-secure
- traefik.http.routers.pg_admin.rule=PathPrefix(`/pgadmin`)
- traefik.http.routers.pg_admin.priority=10
- traefik.http.routers.pg_admin.tls=true
- traefik.http.services.pg_admin.loadbalancer.server.port=5050
# queue:
# image: rabbitmq:3
# Using the below image instead is required to enable the "Broker" tab in the flower UI:
# image: rabbitmq:3-management
#
backend:
build:
context: ./backend
dockerfile: Dockerfile
network: host
container_name: labelstack-backend
depends_on:
- db
- traefik
env_file:
- .env
environment:
- DICOMWEB_ORIGIN=orthanc:8042/dicom-web
expose:
- "8000"
labels:
- traefik.enable=true
- traefik.http.routers.backend.entrypoints=web-secure
- traefik.http.routers.backend.rule=PathPrefix(`/api`)
- traefik.http.routers.backend.priority=10
- traefik.http.routers.backend.tls=true
webapp:
build:
context: ./webapp
dockerfile: Dockerfile
network: host
args:
- API_HOST_ORIGIN=${API_HOST_ORIGIN}
- DICOMWEB_ORIGIN=${DICOMWEB_ORIGIN}
container_name: labelstack-webapp
depends_on:
- traefik
env_file:
- .env
expose:
- "80"
labels:
- traefik.enable=true
- traefik.http.routers.webapp.entrypoints=web-secure
- traefik.http.routers.webapp.rule=PathPrefix(`/`)
- traefik.http.routers.webapp.priority=1
- traefik.http.routers.webapp.tls=true
orthanc:
build:
context: ./pacs
dockerfile: Dockerfile
network: host
container_name: labelstack-orthanc
depends_on:
- db
- traefik
volumes:
# configuration file
- ${ORTHANC_CONFIG}:${ORTHANC_CONFIG_INTERNAL}:ro
# storage volume for raw dicoms
- pacs-data:${ORTHANC_DICOM_DATA_INTERNAL}
- ./pacs/extensions.py:/etc/orthanc/extensions.py:ro
env_file:
- .env
environment:
- POSTGRES_DB=${POSTGRES_ORTHANC_DB}
# DICOMWeb Plugin
- DICOM_WEB_PLUGIN_ENABLED=true
# Postgres Plugin
- POSTGRESQL_PLUGIN_ENABLED=true
command: ${ORTHANC_CONFIG_INTERNAL}
expose:
- "8042"
labels:
- traefik.enable=true
- traefik.http.routers.orthanc.entrypoints=web-secure
- traefik.http.routers.orthanc.rule=PathPrefix(`/pacs`)
- traefik.http.routers.orthanc.priority=10
- traefik.http.routers.orthanc.tls=true
- traefik.http.middlewares.cors-allow.headers.accesscontrolallowmethods=*
- traefik.http.middlewares.cors-allow.headers.accesscontrolalloworiginlist=http://localhost:3000,https://localhost
- traefik.http.middlewares.cors-allow.headers.accesscontrolallowheaders=*
- traefik.http.middlewares.cors-allow.headers.accesscontrolmaxage=100
- traefik.http.middlewares.cors-allow.headers.addvaryheader=true
- traefik.http.middlewares.strip-prefix.stripprefix.prefixes=/pacs
- traefik.http.routers.orthanc.middlewares=cors-allow,strip-prefix
volumes:
app-db-data:
pacs-data: