S2OJ/docker-compose.yml

54 lines
1.1 KiB
YAML
Raw Normal View History

version: "3"
services:
uoj-db:
2022-03-16 09:00:39 +00:00
build:
context: ./db/
dockerfile: Dockerfile
container_name: uoj-db
restart: always
volumes:
- ./uoj_data/db/mysql:/var/lib/mysql
environment:
- MYSQL_DATABASE=app_uoj233
- MYSQL_ROOT_PASSWORD=root
uoj-judger:
2022-03-16 09:00:39 +00:00
build:
context: ./judger/
dockerfile: Dockerfile
container_name: uoj-judger
restart: always
stdin_open: true
tty: true
cap_add:
- SYS_PTRACE
volumes:
2022-03-16 09:00:39 +00:00
- ./uoj_data/judger/log:/opt/uoj_judger/log
environment:
- UOJ_PROTOCOL=http
- UOJ_HOST=uoj-web
- JUDGER_NAME=compose_judger
- JUDGER_PASSWORD=_judger_password_
- SOCKET_PORT=2333
- SOCKET_PASSWORD=_judger_socket_password_
uoj-web:
2022-03-16 09:00:39 +00:00
build:
context: ./
dockerfile: web/Dockerfile
container_name: uoj-web
restart: always
stdin_open: true
tty: true
cap_add:
- SYS_PTRACE
depends_on:
- uoj-db
- uoj-judger
volumes:
- ./uoj_data/web/data:/var/uoj_data
ports:
- "80:80"
- "3690:3690"