-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·40 lines (36 loc) · 1006 Bytes
/
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: "3.7"
services:
# This is the main web server container that uses php:7.4-apache image with some mysql addons
web-server:
build:
dockerfile: Dockerfile
context: .
restart: always
volumes:
- "./sqli-labs:/var/www/html/"
ports:
- "8000:80"
depends_on:
- db
# This is a simple mysql docker container
db:
image: mysql:latest
command: --general_log --general_log_file=/var/log/mysql/mysql.log
restart: always
environment:
MYSQL_ROOT_PASSWORD: secret
volumes:
- ./db/log:/var/log/mysql:Z
- "sql-data:/var/lib/mysql:rw"
# This is just a phpmyadmin container to monitor the db as the videos sometimes show interaction with the database directly if you don't want it you can comment it out.
phpmyadmin:
image: phpmyadmin/phpmyadmin:latest
restart: always
environment:
PMA_HOST: db
PMA_USER: root
PMA_PASSWORD: secret
ports:
- "8080:80"
volumes:
sql-data: