forked from TFcis/NTOJ
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
86 lines (81 loc) · 1.74 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
86 lines (81 loc) · 1.74 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
services:
backend:
build:
context: ./
target: development
command: bash
stdin_open: true
tty: true
develop:
watch:
- path: ./src/
action: sync
target: /ntoj/
ignore:
- tmp/
- code/
- problem/
- path: ./migration/
action: sync
target: /ntoj/migration
- path: ./scripts
action: sync
target: /ntoj/scripts
volumes:
- /srv/ntoj-dev/static:/ntoj/static
- /srv/ntoj-dev/problem:/ntoj/problem
- /srv/ntoj-dev/code:/ntoj/code
# - /srv/ntoj/config.py:/ntoj/config.py
depends_on:
- db
- cache
networks:
- app
- judge_net
ports:
- "5500:5500"
db:
image: postgres:18-alpine
environment:
POSTGRES_USER: ntoj
POSTGRES_PASSWORD: ntoj
POSTGRES_DB: ntoj
volumes:
- /srv/ntoj-dev/db:/var/lib/postgresql/18/docker
networks:
- app
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ntoj -d ntoj"]
interval: 5s
timeout: 5s
retries: 5
cache:
image: redis:8-alpine
volumes:
- /srv/ntoj-dev/cache:/data
networks:
- app
judge:
build: https://github.com/tobiichi3227/NTOJ-Judge-Rewrite.git#main
cap_add:
- MKNOD
- SYS_ADMIN
- SYS_CHROOT
- SYS_RESOURCE
cgroup: host
security_opt:
- seccomp:unconfined
- apparmor:unconfined
- label:disable
tmpfs:
- /dev/shm:rw,exec,size=755,size=4G
volumes:
- /srv/ntoj-dev/problem:/problem:ro
- /srv/ntoj-dev/code:/code:ro
- /sys/fs/cgroup:/sys/fs/cgroup:rw
networks:
- judge_net
privileged: true
networks:
app:
judge_net: