1
1
version : ' 3.8'
2
-
3
2
services :
4
- reproschema :
3
+ reproschema-server :
4
+ container_name : ${CONTAINER_NAME:-reproschema-server}
5
5
build :
6
6
context : .
7
7
dockerfile : docker/Dockerfile
8
8
args :
9
- - NODE_ENV=development
9
+ NODE_VERSION : " 18"
10
+ SCHEMA_SOURCE : ${SCHEMA_SOURCE:-https://raw.githubusercontent.com/ReproNim/demo-protocol/main/DemoProtocol/DemoProtocol_schema}
11
+ ASSETS_PUBLIC_PATH : ${ASSETS_PUBLIC_PATH:-/} # uppercase, consistent
10
12
ports :
11
13
- " ${PORT:-80}:80"
12
- - " 8000:8000"
14
+ - " 8000:8000" # Backend API port
13
15
volumes :
14
- # Development-specific volume mounts
15
- - ./docker/frontend:/usr/src/app
16
- - /usr/src/app/node_modules
17
- - ./docker/backend:/app
18
- - ./tests:/app/tests
19
- # Production volume mounts
16
+ # Local schema mount (only used when SCHEMA_SOURCE=local)
20
17
- ${SCHEMA_PATH:-./schemas}:/schemas:ro
21
- - ${DATA_PATH:-./data}:/data
18
+ # Data storage volume
19
+ - ${DATA_PATH:-./data}:/data:rw
22
20
environment :
23
- # Development-specific settings
24
- - NODE_ENV=development
25
- - VUE_APP_HOT_RELOAD=true
26
- - DEV_MODE=1
21
+ # Core settings
22
+ - NODE_ENV=${NODE_ENV:-development} # Default to development
27
23
28
- # Core settings from production
24
+ # Schema configuration
29
25
- SCHEMA_SOURCE=${SCHEMA_SOURCE:-https://raw.githubusercontent.com/ReproNim/demo-protocol/main/DemoProtocol/DemoProtocol_schema}
26
+
27
+ # UI configuration
28
+ - BANNER=${BANNER:-Reproschema Protocol}
29
+ - START_BUTTON=${START_BUTTON:-Start}
30
+ - STUDY_PREFIX=${STUDY_PREFIX:-study}
31
+
32
+ # Backend configuration
30
33
- REPROSCHEMA_BACKEND_BASEDIR=/data
31
- - INITIAL_TOKEN=${INITIAL_TOKEN:-}
34
+ # For development mode
35
+ - DEV8dac6d02a913=${DEV_MODE:-1}
32
36
- BACKEND_URL=${BACKEND_URL:-/api}
37
+ # Project name for data organization
38
+ - PROJECT_NAME=${PROJECT_NAME:-development} # Default to development
39
+
40
+ # Development settings
41
+ - DEV_MODE=${DEV_MODE:-1} # Default to development mode ON
42
+ - ADMIN_MODE=${ADMIN_MODE:-true}
43
+ - DEBUG_MODE=${DEBUG_MODE:-true}
33
44
34
- # Override SCHEMA_URL for development if needed
35
- - VUE_APP_SCHEMA_URL=${SCHEMA_URL:-http://localhost:${PORT:-80}/schema/demo-protocol.json}
36
-
37
- # Development-specific command to enable hot reloading
38
- command : sh -c "npm run serve & uvicorn main:app --host 0.0.0.0 --port ${BACKEND_PORT:-8000} --reload"
45
+ # Additional configuration
46
+ - VALIDATE_SCHEMA=${VALIDATE_SCHEMA:-true}
47
+ - SCHEMA_TYPE=${SCHEMA_TYPE:-jsonld}
48
+
49
+ # Runtime configuration
50
+ - ASSETS_PUBLIC_PATH=${ASSETS_PUBLIC_PATH:-/} # Use same default as build arg
51
+
52
+ healthcheck :
53
+ test : ["CMD", "curl", "-f", "http://localhost:8000/health"]
54
+ interval : 30s
55
+ timeout : 10s
56
+ retries : 3
57
+ start_period : 15s
58
+ restart : unless-stopped
59
+ logging :
60
+ driver : " json-file"
61
+ options :
62
+ max-size : " 10m"
63
+ max-file : " 3"
64
+ networks :
65
+ - reproschema-net
39
66
40
67
volumes :
41
68
participant_data :
42
- name : ${PROJECT_NAME:-reproschema}_data
69
+ name : ${PROJECT_NAME:-reproschema}_data
70
+ driver : local
71
+ driver_opts :
72
+ type : none
73
+ device : ${DATA_PATH:-./data}
74
+ o : bind
75
+
76
+ networks :
77
+ reproschema-net :
78
+ name : ${PROJECT_NAME:-reproschema}_network
79
+ driver : bridge
0 commit comments