FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
datajoint-docs/docker-compose.yaml at main · datajoint/datajoint-docs · GitHub
datajoint
datajoint-docs
Repository navigation
Code
Issues
5
(5)
Pull requests
6
(6)
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
datajoint-docs
/
docker-compose.yaml
Copy path
More file actions
More file actions
Latest commit
History
History
History
134 lines (130 loc) · 4.7 KB
Breadcrumbs
datajoint-docs
/
docker-compose.yaml
Copy path
File metadata and controls
134 lines (130 loc) · 4.7 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
#
DataJoint Documentation Environment
#
#
MODE="LIVE" docker compose up --build # Live dev server at http://localhost:8000/
#
MODE="BUILD" docker compose up --build # Build static site
#
MODE="EXECUTE" docker compose up --build # Execute notebooks against MySQL
#
MODE="EXECUTE_PG" docker compose up --build # Execute notebooks against PostgreSQL
#
services
:
mysql
:
image
:
mysql:8.0
environment
:
MYSQL_ROOT_PASSWORD
:
tutorial
ports
:
-
"
3306:3306
"
volumes
:
-
mysql_data:/var/lib/mysql
healthcheck
:
test
:
["CMD", "mysqladmin", "ping", "-h", "localhost", "-ptutorial"]
interval
:
5s
timeout
:
5s
retries
:
10
postgres
:
image
:
postgres:15
environment
:
POSTGRES_USER
:
postgres
POSTGRES_PASSWORD
:
tutorial
POSTGRES_DB
:
datajoint
ports
:
-
"
5432:5432
"
volumes
:
-
postgres_data:/var/lib/postgresql/data
healthcheck
:
test
:
["CMD-SHELL", "pg_isready -U postgres"]
interval
:
5s
timeout
:
5s
retries
:
10
minio
:
#
MinIO withdrew its public images: `minio/minio` on Docker Hub is gone
#
entirely, any tag, and `quay.io/minio/minio` now requires authentication.
#
Chainguard publishes a maintained build that needs no credentials and is
#
drop-in here -- it ships `mc`, so the healthcheck below is unchanged.
#
Matches what datajoint-python's test fixture uses.
#
#
It runs as `nonroot`, and a `minio_data` volume left behind by the old
#
root-owned image is not writable by it: MinIO exits with "Unable to write
#
to the backend". A fresh volume inherits the image's world-writable /data
#
and is fine, so `docker compose down -v` once clears it. CI runners start
#
clean and never see this.
image
:
${MINIO_IMAGE:-cgr.dev/chainguard/minio:latest}
environment
:
MINIO_ROOT_USER
:
datajoint
MINIO_ROOT_PASSWORD
:
datajoint
ports
:
-
"
9002:9000
"
-
"
9003:9001
"
volumes
:
-
minio_data:/data
command
:
server /data --console-address ":9001"
healthcheck
:
test
:
["CMD", "mc", "ready", "local"]
interval
:
5s
timeout
:
5s
retries
:
5
docs
:
build
:
context
:
.
dockerfile
:
Dockerfile
environment
:
-
MODE
-
DJ_HOST=${DJ_HOST:-mysql}
-
DJ_USER=${DJ_USER:-root}
-
DJ_PASS=${DJ_PASS:-tutorial}
-
DJ_BACKEND=${DJ_BACKEND:-mysql}
volumes
:
-
.:/main
-
${DJ_PYTHON_PATH:-../datajoint-python}:/datajoint-python
ports
:
-
8000:8000
depends_on
:
mysql
:
condition
:
service_healthy
postgres
:
condition
:
service_healthy
minio
:
condition
:
service_healthy
command
:
-
sh
-
-c
-
|
set -e
if echo "$${MODE}" | grep -i live &>/dev/null; then
# LIVE mode: install datajoint and notebook dependencies for interactive development
pip install -e /datajoint-python
pip install scikit-image pooch
python scripts/gen_llms_full.py
mkdocs serve --config-file ./mkdocs.yaml -a 0.0.0.0:8000
elif echo "$${MODE}" | grep -i build &>/dev/null; then
# BUILD mode: build static site from pre-executed notebooks
# Install datajoint-python for mkdocstrings (needs to import for API docs)
pip install -e /datajoint-python
# Generate llms.txt and llms-full.txt
python scripts/gen_llms_full.py
mkdocs build --config-file ./mkdocs.yaml
elif echo "$${MODE}" | grep -i execute_pg &>/dev/null; then
# EXECUTE_PG mode: execute notebooks against PostgreSQL
pip install -e "/datajoint-python[postgres]"
pip install scikit-image pooch nbconvert matplotlib faker zarr ipywidgets
mkdir -p /tmp/datajoint-tutorials
echo "Executing notebooks against PostgreSQL..."
export DJ_HOST=postgres
python scripts/execute_notebooks.py --backend postgresql
elif echo "$${MODE}" | grep -i execute &>/dev/null; then
# EXECUTE mode: execute notebooks against MySQL (default)
pip install -e /datajoint-python
pip install scikit-image pooch nbconvert matplotlib faker zarr ipywidgets
mkdir -p /tmp/datajoint-tutorials
echo "Executing notebooks against MySQL..."
python scripts/execute_notebooks.py --backend mysql
else
echo "Unexpected mode. Use: LIVE, BUILD, EXECUTE, or EXECUTE_PG"
exit 1
fi
volumes
:
mysql_data
:
#
Persistent storage for tutorial databases
#
Use `docker compose down -v` to reset
postgres_data
:
#
Persistent storage for PostgreSQL databases
minio_data
:
#
Persistent storage for external objects
Back
|
FazBrowse Home
|
New Git URL