-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
87 lines (81 loc) · 1.69 KB
/
docker-compose.yml
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
87
version: '3'
volumes:
ignore:
services:
#
# api:
# build:
# context: .
# dockerfile: ./docker/api/Dockerfile
# container_name: judgelight-api
# volumes:
# - ./cmd:/go/src/app/cmd/
# - ./pkg:/go/src/app/pkg/
# - ./docker/language:/go/src/app/docker/language/
# hostname: backend
# restart: always
# tty: true
# ports:
# - 8080:8080
#
next:
build:
context: .
dockerfile: ./docker/next/Dockerfile
container_name: judgelight-next
environment:
- NODE_ENV=development
- WATCHPACK_POLLING=true
- CHOKIDAR_USEPOLLING=true
volumes:
- ./frontend:/usr/src/app/frontend
- ignore:/node_modules
hostname: frontend
restart: always
ports:
- '3000:3000'
tty: true
working_dir: /usr/src/app/frontend
entrypoint:
- sh
command:
- -c
- |
[ -f ~/.exec-once ] || {
yarn install && yarn build && touch ~/.exec-once
}
yarn dev
nginx:
build:
context: .
dockerfile: ./docker/nginx/Dockerfile
container_name: judgelight-nginx
restart: always
tty: true
depends_on:
- next
ports:
- 80:80
mysql:
build:
context: .
dockerfile: ./docker/mysql/Dockerfile
container_name: judgelight-mysql
restart: always
tty: true
depends_on:
- nginx
ports:
- 4306:3306
volumes:
- ./docker/mysql/data:/var/lib/mysql
- ./docker/mysql/init.d:/docker-entrypoint-initdb.d
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: dev
MYSQL_PASSWORD: dev
networks:
- mysql-network
networks:
mysql-network:
driver: bridge