-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
89 lines (86 loc) · 2.15 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
88
89
version: '2'
services:
scoreboard-server:
build: ./scoreboard-server
environment:
- "WEBHOOK_SECRET=cde314dda67268f78747458e1a9b9677905ea5ce5d02cc1a19374c091d7db4a7"
restart: always
networks:
default:
internal:
ctfd:
build: .
user: root
restart: always
ports:
- "8000:8000"
environment:
- UPLOAD_FOLDER=/var/uploads
- DATABASE_URL=mysql+pymysql://ctfd:ctfd@db/ctfd
- REDIS_URL=redis://cache:6379
- WORKERS=1
- LOG_FOLDER=/var/log/CTFd
- ACCESS_LOG=-
- ERROR_LOG=-
- REVERSE_PROXY=true
- VALORANT_WEBHOOK_URL=http://scoreboard-server:3000/api/webhook
- VALORANT_WEBHOOK_SECRET=cde314dda67268f78747458e1a9b9677905ea5ce5d02cc1a19374c091d7db4a7
volumes:
- .data/CTFd/logs:/var/log/CTFd
- .data/CTFd/uploads:/var/uploads
- .:/opt/CTFd:ro
depends_on:
- db
networks:
default:
internal:
scoreboard:
build: ./scoreboard
restart: always
volumes:
- .:/opt/CTFd:ro
environment:
- CTFD_API_URL=http://ctfd:8000/api/v1
- CTFD_API_KEY=8546031b7b9ee5c6837e6cf45ded0b394e9d40a79b4a24219b16fa07e48f4e21
# - NEXT_PUBLIC_BACKEND_URL=
networks:
default:
internal:
nginx:
image: nginx:stable
restart: always
volumes:
- ./conf/nginx/http.conf:/etc/nginx/nginx.conf
- /etc/letsencrypt:/etc/letsencrypt:ro
ports:
- 80:80
- 443:443
depends_on:
- ctfd
- scoreboard
- scoreboard-server
db:
image: mariadb:10.4.12
restart: always
environment:
- MYSQL_ROOT_PASSWORD=ctfd
- MYSQL_USER=ctfd
- MYSQL_PASSWORD=ctfd
- MYSQL_DATABASE=ctfd
volumes:
- .data/mysql:/var/lib/mysql
networks:
internal:
# This command is required to set important mariadb defaults
command: [mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci, --wait_timeout=28800, --log-warnings=0]
cache:
image: redis:4
restart: always
volumes:
- .data/redis:/data
networks:
internal:
networks:
default:
internal:
internal: true