-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
65 lines (64 loc) · 1.37 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
services:
web:
container_name: dvwa-web
hostname: web
build:
context: dvwa
volumes:
- ./dvwa:/app
- .env:/app/.env
networks:
- web
ports:
- 8000:8000
restart: always
depends_on:
mysql:
condition: service_healthy
pgsql:
condition: service_healthy
mysql:
image: mysql:8.0
container_name: dvwa-mysql
hostname: mysql
networks:
- web
volumes:
- ./mydata:/etc/mysql/conf.d
expose:
- 33060
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
healthcheck:
test: ["CMD", "mysqladmin", "status", "-hlocalhost", "-p${DB_PASSWORD}", "-u${DB_USERNAME}", "--port", "33060"]
interval: 5s
timeout: 5s
retries: 30
pgsql:
image: postgres
container_name: dvwa-pgsql
hostname: pgsql
networks:
- web
volumes:
- ./pgdata:/var/lib/postgresql/data
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_PASSWORD: ${DB_PASSWORD}
healthcheck:
test: [ "CMD", "pg_isready", "-q", "-d", "vaccine", "-U", "${DB_USERNAME}" ]
interval: 5s
retries: 12
adminer:
image: adminer
restart: always
ports:
- 8080:8080
networks:
- web
networks:
web: