forked from scnu-socoding/scnuoj
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
77 lines (72 loc) · 1.58 KB
/
docker-compose.yaml
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
version: "3"
services:
myadminfortest:
image: phpmyadmin/phpmyadmin
container_name: myadmin
ports:
- 8888:80
environment:
UPLOAD_LIMIT: 512M
MEMORY_LIMIT: 1024M
depends_on:
- mysql
links:
- mysql:db
mysql:
image: mysql:8.0
container_name: mysql
restart: always
volumes:
- ./data/mysqld:/var/run/mysqld
- ./data/mysql/data:/var/lib/mysql
- ./data/mysql/conf.d:/etc/mysql/conf.d
- ./conf.d/init.sql:/docker-entrypoint-initdb.d/init.sql
environment:
MYSQL_ROOT_PASSWORD: yourpassword
TZ: Asia/Shanghai
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 30s
timeout: 10s
retries: 3
caddy:
image: caddy:latest
container_name: caddy
restart: always
ports:
- 80:80
- 443:443
volumes:
- ./conf.d/Caddyfile:/etc/caddy/Caddyfile
- ./:/var/www/html
environment:
- TZ=Asia/Shanghai
depends_on:
- php
php:
container_name: php
restart: always
build:
context: .
dockerfile: Dockerfile
volumes:
- ./:/var/www/html
# ports:
# - "9000:9000"
depends_on:
mysql:
condition: service_healthy
judge:
container_name: judge
restart: always
network_mode: none
build:
context: .
dockerfile: Dockerfile.judge.alpine
volumes:
- ./data/mysqld/mysqld.sock:/judge/mysqld.sock
- ./judge:/judge/judge
- ./polygon:/judge/polygon
depends_on:
mysql:
condition: service_healthy