-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
40 lines (37 loc) · 1.49 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
version: "2"
services:
mysql:
image: mysql:5.6
command: mysqld --character-set-server=utf8 --collation-server=utf8_unicode_ci
restart: always
environment:
MYSQL_ROOT_PASSWORD: rootwolf
MYSQL_PORT: 3306
ports:
- 3306:3306
volumes:
- ./runenv/mysql:/etc/mysql
- ./runenv/mysql-data/init.sql:/docker-entrypoint-initdb.d/grant.sql
container_name: vulnapp-mysql
goapp:
image: golang:1.13-alpine3.10
ports:
- 9090:9090
volumes:
- $PWD:/goapp
working_dir: /goapp
command: sh -c "sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/' /etc/apk/repositories && apk update && go env -w GO111MODULE=on && go env -w GOPROXY=https://goproxy.cn,direct && apk add git mysql-client && go get github.com/go-sql-driver/mysql && go get golang.org/x/xerrors && go build -o vulnapp && ./vulnapp -p 9090"
depends_on:
- mysql
container_name: vulnapp-goapp
csrftrap:
image: golang:1.13-alpine3.10
ports:
- 3030:3030
volumes:
- $PWD:/goapp
working_dir: /goapp/Trap
command: sh -c "chmod +x /goapp/Trap/init.sh && /goapp/Trap/init.sh && sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/' /etc/apk/repositories && apk update && go env -w GO111MODULE=on && go env -w GOPROXY=https://goproxy.cn,direct && apk add git && go get github.com/go-sql-driver/mysql && go get golang.org/x/xerrors && go build -o trapapp && ./trapapp"
container_name: vulnapp-csrftrap
environment:
- HOST=${HOST}