Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
61 lines (60 loc) · 2.71 KB
/
Copy pathdocker-compose.yml
File metadata and controls
61 lines (60 loc) · 2.71 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
services:
openms-streamlit-template:
build:
context: .
dockerfile: Dockerfile
# Optional: GITHUB_TOKEN in the environment lets the build bundle the
# latest release's Windows installer. It is passed as a build secret,
# so it is not stored in the image.
secrets:
- github_token
image: openms_streamlit_template
container_name: openms-streamlit-template
restart: always
ports:
- 8501:8501
# The sync service below shares this container's network, so its port
# is published here: on loopback only, for the host's TLS proxy to route
# /sync to. Plain HTTP would carry sync tokens and files in the clear.
- 127.0.0.1:8502:8502
volumes:
- workspaces-streamlit-template:/workspaces-streamlit-template
# Optional: bind-mount a host directory of MS data files at the path
# that `local_data_dir` in settings.json points to (the Docker image
# defaults this to /mounted-data). When the directory exists at
# runtime, the upload page shows an in-app file browser for it.
# - /path/on/host:/mounted-data:ro
environment:
# Number of Streamlit server instances (default: 1 = no load balancer).
# Set to >1 to enable nginx load balancing across multiple Streamlit instances.
- STREAMLIT_SERVER_COUNT=1
# The sync service below; with STREAMLIT_SERVER_COUNT > 1 the bundled
# nginx proxies /sync/ to it.
- SYNC_UPSTREAM=127.0.0.1:8502
# With the data mount above, name its host folder so the upload page
# can show users where to put their files:
# - LOCAL_DATA_HOST_DIR=/path/on/host
# Workspace sync service for the desktop app (workspace_sync in
# settings.json), in its own container so large transfers neither compete
# with the app nor break when it restarts. Same image, same workspaces
# volume. Put it behind the same reverse proxy as the app at /sync/, or set
# workspace_sync.public_url to wherever it is reachable. It shares the app
# container's network namespace to reach the Redis queue that container
# runs on localhost: the desktop app starts workflow runs through it.
sync:
image: openms_streamlit_template
container_name: openms-streamlit-template-sync
restart: always
depends_on:
- openms-streamlit-template
entrypoint: ["/bin/bash", "-c", "source /root/miniforge3/bin/activate streamlit-env && exec python -m src.sync.server --port 8502"]
network_mode: "service:openms-streamlit-template"
environment:
- REDIS_URL=redis://localhost:6379/0
volumes:
- workspaces-streamlit-template:/workspaces-streamlit-template
secrets:
github_token:
environment: GITHUB_TOKEN
volumes:
workspaces-streamlit-template: