-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
77 lines (71 loc) · 1.66 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
version: '3'
services:
# The Application
score_server:
build:
context: laravel
working_dir: /var/www/beginner-sqli
user: www-data
volumes:
- score_server_volume:/var/www/beginner-sqli
env_file:
- .env
environment:
- "DB_HOST=database"
- "DB7_HOST=database7"
depends_on:
- database
restart: unless-stopped
# Challenge Server
challenges:
build:
context: challenges
working_dir: /var/www/challenges
volumes:
- challenges_volume:/var/www/challenges
environment:
- "DB7_HOST=database7"
- "DB7_DATABASE=m1z0r3"
- "DB7_USERNAME=${DB7_USERNAME}"
- "DB7_PASSWORD=${DB7_PASSWORD}"
depends_on:
- database7
restart: unless-stopped
# The Web Server
web:
build:
context: nginx
volumes:
- score_server_volume:/var/www/beginner-sqli
- challenges_volume:/var/www/challenges
depends_on:
- score_server
- challenges
ports:
- ${APP_PORT}:80
- ${CHALLENGE_PORT}:8080
restart: unless-stopped
# Database for score server
database:
image: mysql:5.6
volumes:
- dbdata:/var/lib/mysql
environment:
- "MYSQL_DATABASE=${DB_DATABASE}"
- "MYSQL_USER=${DB_USERNAME}"
- "MYSQL_PASSWORD=${DB_PASSWORD}"
- "MYSQL_RANDOM_ROOT_PASSWORD=yes"
restart: unless-stopped
# Database for tutorial7
database7:
build:
context: challenge7-db
environment:
- "MYSQL_USER=${DB7_USERNAME}"
- "MYSQL_PASSWORD=${DB7_PASSWORD}"
- "MYSQL_RANDOM_ROOT_PASSWORD=yes"
restart: unless-stopped
volumes:
score_server_volume:
challenges_volume:
dbdata: