mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-08 12:58:42 +00:00
feat: prod docker compose config
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
cd868149a9
commit
ce0c47821f
25
README.md
25
README.md
@ -1,4 +1,4 @@
|
|||||||
<img src="./web/images/logo_small.png" alt="Logo" width="64" height="64" align="right" />
|
<img src="./web/images/logo_small.png" alt="Logo" width="100" height="100" align="right" />
|
||||||
|
|
||||||
# S2OJ
|
# S2OJ
|
||||||
|
|
||||||
@ -17,10 +17,29 @@
|
|||||||
|
|
||||||
## 文档
|
## 文档
|
||||||
|
|
||||||
有关安装、管理、维护,可参阅:[https://universaloj.github.io/](https://universaloj.github.io/)
|
有关安装、管理、维护,可参阅:[https://universaloj.github.io/](https://universaloj.github.io/) 和 [https://vfleaking.github.io/uoj/](https://vfleaking.github.io/uoj/)。
|
||||||
|
|
||||||
|
## 部署
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker-compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
更新:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker-compose pull
|
||||||
|
docker-compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
## 开发
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker-compose up --build -f docker-compose.development.yml
|
||||||
|
```
|
||||||
|
|
||||||
## 感谢
|
## 感谢
|
||||||
|
|
||||||
- [vfleaking](https://github.com/vfleaking) 将 UOJ 代码[开源](https://github.com/vfleaking/uoj)
|
- [vfleaking](https://github.com/vfleaking) 将 UOJ 代码 [开源](https://github.com/vfleaking/uoj)
|
||||||
- 向原项目或本项目贡献代码的人
|
- 向原项目或本项目贡献代码的人
|
||||||
- 给我们启发与灵感以及提供意见和建议的人
|
- 给我们启发与灵感以及提供意见和建议的人
|
||||||
|
61
docker-compose.development.yml
Normal file
61
docker-compose.development.yml
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
version: "3"
|
||||||
|
services:
|
||||||
|
uoj-db:
|
||||||
|
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:
|
||||||
|
build:
|
||||||
|
context: ./judger/
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
container_name: uoj-judger
|
||||||
|
restart: always
|
||||||
|
stdin_open: true
|
||||||
|
tty: true
|
||||||
|
cap_add:
|
||||||
|
- SYS_PTRACE
|
||||||
|
volumes:
|
||||||
|
- ./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:
|
||||||
|
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
|
||||||
|
- ./uoj_data/web/storage:/opt/uoj/web/app/storage
|
||||||
|
ports:
|
||||||
|
- "80:80"
|
||||||
|
environment:
|
||||||
|
- 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
|
@ -1,10 +1,7 @@
|
|||||||
version: "3"
|
version: "3"
|
||||||
services:
|
services:
|
||||||
|
|
||||||
uoj-db:
|
uoj-db:
|
||||||
build:
|
image: git.m.ac/baoshuo/s2oj-db
|
||||||
context: ./db/
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
container_name: uoj-db
|
container_name: uoj-db
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
@ -14,9 +11,7 @@ services:
|
|||||||
- MYSQL_ROOT_PASSWORD=root
|
- MYSQL_ROOT_PASSWORD=root
|
||||||
|
|
||||||
uoj-judger:
|
uoj-judger:
|
||||||
build:
|
image: git.m.ac/baoshuo/s2oj-judger
|
||||||
context: ./judger/
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
container_name: uoj-judger
|
container_name: uoj-judger
|
||||||
restart: always
|
restart: always
|
||||||
stdin_open: true
|
stdin_open: true
|
||||||
@ -34,9 +29,7 @@ services:
|
|||||||
- SOCKET_PASSWORD=_judger_socket_password_
|
- SOCKET_PASSWORD=_judger_socket_password_
|
||||||
|
|
||||||
uoj-web:
|
uoj-web:
|
||||||
build:
|
image: git.m.ac/baoshuo/s2oj-web
|
||||||
context: ./
|
|
||||||
dockerfile: web/Dockerfile
|
|
||||||
container_name: uoj-web
|
container_name: uoj-web
|
||||||
restart: always
|
restart: always
|
||||||
stdin_open: true
|
stdin_open: true
|
||||||
|
Loading…
Reference in New Issue
Block a user