forked from EddieHubCommunity/HealthCheck
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yaml
43 lines (41 loc) · 938 Bytes
/
compose.yaml
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
services:
app:
build:
context: .
dockerfile: Dockerfile.dev
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules
env_file:
- .env
environment: # To override the DB URL in the .env file
- DATABASE_URL=postgresql://user:password@postgres:5432/healthcheck?schema=public
depends_on:
postgres:
condition: service_healthy
ports:
- 3000:3000
networks:
- healthcheck
restart: always
container_name: app
postgres:
image: postgres:16.3-alpine
ports:
- 5432:5432
restart: always
environment:
- POSTGRES_DB=healthcheck
- POSTGRES_USER=user
- POSTGRES_PASSWORD=password
networks:
- healthcheck
healthcheck:
test: [CMD, pg_isready, -U, user, -d, healthcheck]
interval: 10s
timeout: 5s
retries: 5
container_name: postgres
networks:
healthcheck:
driver: bridge