-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.ui.yml
More file actions
53 lines (53 loc) · 1.82 KB
/
docker-compose.ui.yml
File metadata and controls
53 lines (53 loc) · 1.82 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
services:
pythonui:
restart: always
image: ${PYTHONUI_IMG}:${VERS_UI}
build:
dockerfile: ./oasisui_st_app.Dockerfile
ports:
- "8501:8501"
labels:
- "traefik.enable=true"
# HTTP router (normal UI access)
- "traefik.http.routers.pythonui.rule=PathPrefix(`/`)"
- "traefik.http.routers.pythonui.entrypoints=web"
- "traefik.http.routers.pythonui.priority=1"
# HTTPS router (OIDC callback redirects to /?session_token=... on HTTPS)
- "traefik.http.routers.pythonui-secure.rule=PathPrefix(`/`)"
- "traefik.http.routers.pythonui-secure.entrypoints=websecure"
- "traefik.http.routers.pythonui-secure.tls=true"
- "traefik.http.routers.pythonui-secure.priority=1"
# Shared service
- "traefik.http.services.pythonui.loadbalancer.server.port=8501"
environment:
- API_URL=http://server:8000
- API_AUTH_TYPE=${API_AUTH_TYPE}
- OASIS_HOSTNAME=${OASIS_UI_HOSTNAME}
- OASIS_PROTOCOL=${OASIS_PROTOCOL:-http}
volumes:
- ./defaults/:/usr/src/app/defaults/
- ./ui-config.json:/usr/src/app/ui-config.json:ro
- ./.streamlit/:/usr/src/app/.streamlit:ro
healthcheck:
test: ["CMD", "python3", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8501/_stcore/health')"]
interval: 30s
timeout: 5s
retries: 5
start_period: 30s
depends_on:
server:
condition: service_healthy
develop:
watch:
- action: sync
path: ./app.py
target: /usr/src/app/app.py
- action: sync
path: ./pages/
target: /usr/src/app/pages/
- action: sync
path: ./modules/
target: /usr/src/app/modules/
- action: sync
path: ./ui-config.json
target: /usr/src/app/ui-config.json