-
Notifications
You must be signed in to change notification settings - Fork 2
/
compose.yml
169 lines (162 loc) · 5.3 KB
/
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
# This Docker Compose manifest is dedicated to a local installation
# of OpenHexa.
# Do not change it without good reaons.
x-app: &common
image: "blsq/openhexa-app:main"
platform: linux/amd64
networks:
- openhexa
extra_hosts:
db: host-gateway
volumes:
- "${WORKSPACE_STORAGE_LOCATION}:/data"
env_file:
- path: ${OPENHEXA_CONF_FILE}
required: true
environment:
# Internal configuration
########################
# It allows us to run the fixture command
DEBUG: true
# The Python module where Django can find its settings
DJANGO_SETTINGS_MODULE: config.settings.local
# The URI to access the Jupyter Hub through the local Docker network
NOTEBOOKS_HUB_URL: http://jupyterhub:8000/hub
# The URL passed to the pipelines to access the backend API through the
# local Docker network.
PIPELINE_API_URL: http://app:8000
# The hostname to access the database. It corresponds to an added extra
# host that is the Docker gateway (see above).
DATABASE_HOST: db
WORKSPACES_DATABASE_HOST: db
WORKSPACES_DATABASE_PROXY_HOST: db
# To control what hostname can access the backend
ADDITIONAL_ALLOWED_HOSTS: "app,frontend"
services:
app:
<<: *common
command: "manage runserver 0:8000"
restart: unless-stopped
container_name: app
ports:
- "${APP_PORT:-8000}:8000"
healthcheck:
test: curl "http://app:8000/ready" || exit 1
interval: "60s"
timeout: "3s"
start_period: "5s"
retries: 3
frontend:
image: "blsq/openhexa-frontend:main"
platform: linux/amd64
networks:
- openhexa
container_name: frontend
ports:
- "${FRONTEND_PORT:-3000}:3000"
env_file:
- path: ${OPENHEXA_CONF_FILE}
required: true
environment:
# Internal configuration
########################
# The URL to access the backend through the local Docker network
OPENHEXA_BACKEND_URL: http://app:8000
profiles:
- frontend
restart: unless-stopped
depends_on:
- app
healthcheck:
test: wget --no-verbose --tries=1 --spider "http://0.0.0.0:3000/ready" || exit 1
interval: "60s"
timeout: "3s"
start_period: "5s"
retries: 3
pipelines_runner:
<<: *common
command: "manage pipelines_runner"
restart: unless-stopped
profiles:
- "pipelines"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
healthcheck:
test: \[ $(ps -p $(pgrep "python") -o etimes | tail -n +2) -gt 14 \]
interval: "60s"
timeout: "1s"
start_period: "15s"
retries: 3
pipelines_scheduler:
<<: *common
command: "manage pipelines_scheduler"
restart: unless-stopped
profiles:
- "pipelines"
healthcheck:
test: \[ $(ps -p $(pgrep "python") -o etimes | tail -n +2) -gt 14 \]
interval: "60s"
timeout: "1s"
start_period: "15s"
retries: 3
jupyter:
image: ${DEFAULT_WORKSPACE_IMAGE:-blsq/openhexa-base-environment}
platform: linux/amd64
command: echo
profiles:
- spawned-notebook
jupyterhub:
platform: linux/amd64
image: blsq/openhexa-jupyterhub:local-2024.11.15
command: ["jupyterhub", "-f", "/etc/jupyterhub/jupyterhub_dev_config.py"]
container_name: jupyterhub
networks:
- openhexa
profiles:
- notebook
env_file:
- path: ${OPENHEXA_CONF_FILE}
required: true
environment:
# Internal configuration
########################
# The name of the local Docker network to join
DOCKER_NETWORK_NAME: openhexa
# The hostname where to access the Jupyter Hub service on the local Docker
# network
HUB_IP: jupyterhub
# The URI of the database dedicated to the Jupyter Hub
HUB_DB_URL: postgresql://${JUPYTERHUB_DATABASE_USER:-hexa-hub}:${JUPYTERHUB_DATABASE_PASSWORD:-hexa-hub}@host.docker.internal:${DATABASE_PORT:-5432}/${JUPYTERHUB_DATABASE_NAME:-hexa-hub}
# The URI to authenticate by the backend through the local Docker network
AUTHENTICATION_URL: http://app:8000/notebooks/authenticate/
# The URI to get the default credentials by the backend through the local
# Docker network
DEFAULT_CREDENTIALS_URL: http://app:8000/notebooks/default-credentials/
# The URI to get the workspace credentials by the backend through the
# local Docker network
WORKSPACE_CREDENTIALS_URL: http://app:8000/workspaces/credentials/
# The URL to log out by the backend through the local Docker network
LOGOUT_REDIRECT_URL: http://app:8000/
# The URL to access the backend through the local Docker network
HEXA_SERVER_URL: http://app:8000/
# Make sure that we load the settings to run locally
LOAD_DEV_CONFIG: "true"
# Networking
############
CONTENT_SECURITY_POLICY: "frame-ancestors 'self' ${PROXY_HOSTNAME_AND_PORT:-localhost}:*"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- ${JUPYTERHUB_PORT:-8001}:8000
extra_hosts:
host.docker.internal: host-gateway
restart: on-failure
healthcheck:
test: curl "http://localhost:8000/health" || exit 1
interval: "60s"
timeout: "3s"
start_period: "5s"
retries: 3
networks:
openhexa:
name: openhexa