-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
51 lines (46 loc) · 1.01 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
services:
app:
build:
context: .
dockerfile: Dockerfile
env_file: "dev.env"
depends_on:
db:
condition: service_healthy
volumes:
- ./www:/var/www/html # Mount the local directory to the container
ports:
- "8080:80"
healthcheck:
test: curl --fail http://localhost || exit 1
interval: 60s
retries: 5
start_period: 20s
timeout: 10s
db:
image: postgres:latest
env_file: "dev.env"
expose:
- "5432"
volumes:
# - database:/var/lib/postgresql/data
- ./db:/docker-entrypoint-initdb.d
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}" ]
interval: 5s
timeout: 10s
retries: 30
pgadmin:
image: dpage/pgadmin4:latest
env_file: "dev.env"
ports:
- "8081:80"
volumes:
- pgadmin_data:/var/lib/pgadmin
depends_on:
db:
condition: service_healthy
restart: always
volumes:
pgadmin_data:
# database: