-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
111 lines (99 loc) · 4.54 KB
/
docker-compose.yaml
File metadata and controls
111 lines (99 loc) · 4.54 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
services:
jamovi-deps:
image: jamovi/jamovi-deps:2.7.11
build:
context: .
dockerfile: docker/deps-Dockerfile
profiles:
- donotstart
heystat: &base
image: heystat/heystat:2.7.6
container_name: heystat
profiles: [main]
build:
context: .
dockerfile: docker/jamovi-Dockerfile
ports:
- '42337:80'
command: ["/usr/bin/python3 -u -m jamovi.server 42337 --if=*"]
stdin_open: true
# Stop grace period must be an integer duration supported by the Docker API.
# Using a fractional value (e.g. 0.1s) causes an error in some compose/engine
# implementations: `cannot unmarshal number 0.1 into Go struct field CreateRequest.StopTimeout of type int`.
# Use 1s (one second) or an integer number of seconds instead.
stop_grace_period: 1s
environment: &base_env
# block Rj - don't enable unless you understand the risks!
JAMOVI_ALLOW_ARBITRARY_CODE: 'false'
# for security, HeyStat runs across 3 origins
#
# Using path-based separation for single domain setup
# Port changed to 42337 to avoid conflict with other services
JAMOVI_HOST_A: 'heystat.pedu.vn'
JAMOVI_HOST_B: 'heystat.pedu.vn/analyses'
JAMOVI_HOST_C: 'heystat.pedu.vn/results'
# separate by host (RECOMMENDED)
# JAMOVI_HOST_A: 'jamovi.127.0.0.1.nip.io:41337'
# JAMOVI_HOST_B: 'a.jamovi.127.0.0.1.nip.io:41337'
# JAMOVI_HOST_C: 'r.jamovi.127.0.0.1.nip.io:41337'
# separate by path (NOT RECOMMENDED! REDUCES SECURITY!)
# JAMOVI_HOST_A: 'jamovi.127.0.0.1.nip.io:41337'
# JAMOVI_HOST_B: 'jamovi.127.0.0.1.nip.io:41337/analyses'
# JAMOVI_HOST_C: 'jamovi.127.0.0.1.nip.io:41337/results'
# prevent unauthorized access
# Let Jamovi auto-generate access key on first access
# Set a stable access key for automated testing. Use a secret in production.
# JAMOVI_ACCESS_KEY: 'your-secret-key-here'
# then access jamovi with ?access_key=yourpasswordhere added to the url
# i.e. 127.0.0.1:41337/?access_key=yourpasswordhere
# or alternatively, remove the password requirement:
JAMOVI_ACCESS_KEY: ''
# Or set JAMOVI_DISABLE_ACCESS_KEY=1 (or true) to explicitly disable
# access-key enforcement without changing the configured value. This is
# handy for local testing but SHOULD NOT be used in production.
# JAMOVI_DISABLE_ACCESS_KEY: '1'
# HeyStat classroom Phase 10: shared secret for collab_role token verification
JAMOVI_COLLAB_SECRET: 'e371961a9dacabc68b0073c5b951283ec9fb1e90b3c8603a23e7e2c03722e44c'
volumes:
- ./Documents:/root/Documents
- ./jamovi-modules:/root/.jamovi/modules
# Mount fixed public_roots.py (HeyStat reverse-proxy support)
- ./server/jamovi/server/public_roots.py:/usr/lib/jamovi/server/jamovi/server/public_roots.py:ro
# NOTE: ./client/dist is intentionally NOT mounted here.
# The built image already contains the compiled client. Only mount
# client/dist if you run `npm run build` locally and want to override.
heystat-dev:
<<: *base
container_name: heystat-dev
profiles: [dev]
environment:
<<: *base_env
JAMOVI_DEV_SERVER: "http://vite:5173"
test:
<<: *base
container_name: heystat-tests
profiles: [tests]
command: ["/usr/bin/python3 -u -m pytest /usr/lib/jamovi/server/jamovi/tests"]
vite:
image: jonathonlove/vite:latest
container_name: vite
profiles: [dev]
privileged: true
command: [ 'mkdir -p /source/merged && unionfs-fuse -o cow /source/server:/source/client=RW /source/merged && cd /source/merged && echo installing npm deps && npm install && echo starting vite server && vite --host' ]
volumes:
- './client/main:/source/client/main'
- './client/resultsview:/source/client/resultsview'
- './client/analysisui:/source/client/analysisui'
- './client/lib:/source/client/lib'
- './client/assets:/source/client/assets'
- './client/common:/source/client/common'
- './client/index.html:/source/client/index.html'
- './client/resultsview.html:/source/client/resultsview.html'
- './client/analysisui.html:/source/client/analysisui.html'
- './client/tsconfig.json:/source/client/tsconfig.json'
- './client/vite.config.mts:/source/client/vite.config.mts'
- './client/package.json:/source/client/package.json'
- './server/jamovi/server/jamovi.proto:/source/server/assets/coms.proto'
ports:
- '5173:5173'
- '24678:24678'