-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
71 lines (71 loc) · 2.02 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
version: '3.8'
services:
fresh-vuln-showcase:
build:
context: .
dockerfile: Dockerfile
depends_on:
fresh-db:
condition: service_healthy
fresh-db-init:
condition: service_completed_successfully
mailer:
condition: service_started
links:
- "fresh-db:database"
volumes:
- .:/opt/vuln-showcase:r
- postgres-volume:/var/run/postgresql/:rw
environment:
PGHOST: /var/run/postgresql
PGPORT: 5432
PGDATABASE: app
PGUSER: appuser
PGPASSWORD: test
ports:
- 8000:8000
fresh-db:
image: 'postgres:14-alpine'
restart: always
environment:
POSTGRES_USER: appuser
POSTGRES_PASSWORD: test
POSTGRES_DB: app
LANG: C
volumes:
- postgres-volume:/var/run/postgresql/
healthcheck:
test: ["CMD", "pg_isready", "-q", "-d", "${POSTGRES_DB:-app}", "-U", "${POSTGRES_USER:-appuser}"]
interval: 10s
timeout: 30s
retries: 5
start_period: 20s
fresh-db-init:
build:
context: ./init-sql
dockerfile: Dockerfile
depends_on:
fresh-db:
condition: service_healthy
volumes:
- postgres-volume:/var/run/postgresql/:rw
- ./init-sql:/init-sql:r
fresh-db-reinit:
build:
context: ./init-sql
dockerfile: DockerfileOnChange
depends_on:
fresh-db:
condition: service_healthy
fresh-db-init:
condition: service_completed_successfully
volumes:
- postgres-volume:/var/run/postgresql/:rw
- ./init-sql:/init-sql:r
mailer:
image: schickling/mailcatcher
ports:
- 1025:1025
- 1080:1080
volumes:
postgres-volume: