-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
95 lines (89 loc) · 1.91 KB
/
docker-compose.yml
File metadata and controls
95 lines (89 loc) · 1.91 KB
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
88
89
90
91
92
93
94
95
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/
- ./setting.yaml:/go/src/app/setting.yaml
hostname: backend
restart: always
tty: true
ports:
- 8080:8080
depends_on:
- mysql
networks:
- app-network
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
networks:
- app-network
nginx:
build:
context: .
dockerfile: ./docker/nginx/Dockerfile
container_name: judgelight-nginx
restart: always
tty: true
depends_on:
- next
- api
ports:
- 80:80
volumes:
- ./docker/nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf
networks:
- app-network
mysql:
build:
context: .
dockerfile: ./docker/mysql/Dockerfile
container_name: judgelight-mysql
restart: always
tty: true
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:
- app-network
networks:
app-network:
driver: bridge