-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
52 lines (49 loc) · 1.73 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
52 lines (49 loc) · 1.73 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
# ExamBox - development stack
#
# Variant of docker-compose.yml that mounts the Docker socket into the exam
# manager and builds the student image, so the manager can provision one
# container per student (see docker_manager.py and the Roadmap in README.md).
#
# Requires HOST_DATA_PATH in .env: the absolute host path to this repo's data/
# directory. Bind mounts are resolved by the host daemon, so it cannot be
# inferred from inside the container.
#
# docker compose -f docker-compose.dev.yml up --build
services:
exam-manager:
build:
context: ./exam-manager
dockerfile: Dockerfile
container_name: exambox-manager
ports:
- "8000:8000"
volumes:
- ./data/exams:/app/data/exams
- ./data/materials:/app/data/materials
- ./data/work:/app/data/work
- ./data/submissions:/app/data/submissions
- ./data/requirements:/app/data/requirements
- ./data/db:/app/data
# Docker socket. The leading // is a Windows/Git-Bash path-mangling guard
# and is harmless on Linux and macOS.
- //var/run/docker.sock:/var/run/docker.sock
environment:
- DATA_PATH=/app/data
- HOST_DATA_PATH=${HOST_DATA_PATH:?set HOST_DATA_PATH in .env to the host path of this repo/data}
- DATABASE_URL=sqlite+aiosqlite:///./data/exambox.db
- EXAM_MANAGER_URL=http://exam-manager:8000
- EXAM_NETWORK=exambox_exam_network
networks:
- exambox_network
restart: unless-stopped
student-image-builder:
build:
context: ./student-image
dockerfile: Dockerfile
image: exambox-student:latest
container_name: exambox-student-builder
command: ["echo", "Student image built"]
networks:
exambox_network:
driver: bridge
name: exambox_exam_network