S2OJ/docker-compose.yml
Baoshuo e77fe16199
All checks were successful
continuous-integration/drone/push Build is passing
chore: add uoj_protocol config
2022-09-20 13:50:29 +08:00

58 lines
1.4 KiB
YAML

version: "3"
services:
uoj-db:
image: git.m.ac/baoshuo/s2oj-db
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:
image: git.m.ac/baoshuo/s2oj-judger
container_name: uoj-judger
restart: always
stdin_open: true
tty: true
cap_add:
- SYS_PTRACE
volumes:
- ./uoj_data/judger/log:/opt/uoj_judger/log
- ./uoj_data/judger/data:/opt/uoj_judger/uoj_judger/data
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:
image: git.m.ac/baoshuo/s2oj-web
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
- ./uoj_data/web/storage:/opt/uoj/web/app/storage
ports:
- "80:80"
environment:
- UOJ_PROTOCOL=https
- DATABASE_HOST=uoj-db
- DATABASE_PASSWORD=root
- JUDGER_SOCKET_PORT=2333
- JUDGER_SOCKET_PASSWORD=_judger_socket_password_
- SALT_0=salt_0
- SALT_1=salt_1
- SALT_2=salt_2
- SALT_3=salt_3