Skip to content

Commit c8521b0

Browse files
committed
Add docker-compose
1 parent f9fe7ad commit c8521b0

File tree

1 file changed

+115
-0
lines changed

1 file changed

+115
-0
lines changed

docker-compose.yml

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
version: '2'
2+
3+
services:
4+
ctfd:
5+
build: .
6+
user: root
7+
restart: always
8+
environment:
9+
- UPLOAD_FOLDER=/var/uploads
10+
- DATABASE_URL=mysql+pymysql://root:ctfd@db/ctfd
11+
- REDIS_URL=redis://cache:6379
12+
- WORKERS=1
13+
- LOG_FOLDER=/var/log/CTFd
14+
- ACCESS_LOG=-
15+
- ERROR_LOG=-
16+
- VIRTUAL_HOST=ctf.site.com
17+
- LETSENCRYPT_HOST=ctf.site.com
18+
volumes:
19+
- .data/CTFd/logs:/var/log/CTFd
20+
- .data/CTFd/uploads:/var/uploads
21+
- .:/opt/CTFd:ro
22+
depends_on:
23+
- db
24+
networks:
25+
default:
26+
internal:
27+
db:
28+
image: mariadb:10.4
29+
restart: always
30+
environment:
31+
- MYSQL_ROOT_PASSWORD=ctfd
32+
- MYSQL_USER=ctfd
33+
- MYSQL_PASSWORD=ctfd
34+
- MYSQL_DATABASE=ctfd
35+
volumes:
36+
- .data/mysql:/var/lib/mysql
37+
networks:
38+
internal:
39+
# This command is required to set important mariadb defaults
40+
command: [mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci, --wait_timeout=28800, --log-warnings=0]
41+
42+
cache:
43+
image: redis:4
44+
restart: always
45+
volumes:
46+
- .data/redis:/data
47+
networks:
48+
internal:
49+
50+
nginx-proxy:
51+
image: jwilder/nginx-proxy
52+
ports:
53+
- "80:80"
54+
- "443:443"
55+
volumes:
56+
- conf:/etc/nginx/conf.d
57+
- vhost:/etc/nginx/vhost.d
58+
- html:/usr/share/nginx/html
59+
- dhparam:/etc/nginx/dhparam
60+
- certs:/etc/nginx/certs:ro
61+
- /var/run/docker.sock:/tmp/docker.sock:ro
62+
networks:
63+
default:
64+
internal:
65+
66+
nginx-proxy-companion:
67+
image: jrcs/letsencrypt-nginx-proxy-companion
68+
volumes_from:
69+
- nginx-proxy
70+
volumes:
71+
- certs:/etc/nginx/certs:rw
72+
- /var/run/docker.sock:/var/run/docker.sock:ro
73+
74+
whoami:
75+
image: jwilder/whoami
76+
environment:
77+
- VIRTUAL_HOST=whoami.ctf.site.com
78+
- LETSENCRYPT_HOST=whoami.ctf.site.com
79+
80+
mr-robot:
81+
image: nginx:alpine
82+
volumes:
83+
- /root/hacknflag/web/mr-robot/server:/usr/share/nginx/html:ro
84+
environment:
85+
- VIRTUAL_HOST=mr-robot.ctf.site.com
86+
- LETSENCRYPT_HOST=mr-robot.ctf.site.com
87+
88+
script-kiddies:
89+
image: nginx:alpine
90+
volumes:
91+
- /root/hacknflag/web/script-kiddies/server:/usr/share/nginx/html:ro
92+
environment:
93+
- VIRTUAL_HOST=script-kiddies.ctf.site.com
94+
- LETSENCRYPT_HOST=script-kiddies.ctf.site.com
95+
96+
crack-me:
97+
build: /root/hacknflag/miscellaneous/crack-me/server
98+
ports:
99+
- "8080:8080"
100+
fsa:
101+
build: /root/hacknflag/binary/FSA/server
102+
ports:
103+
- "8081:8080"
104+
105+
106+
networks:
107+
default:
108+
internal:
109+
internal: true
110+
volumes:
111+
conf:
112+
vhost:
113+
html:
114+
dhparam:
115+
certs:

0 commit comments

Comments
 (0)