-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
37 lines (30 loc) · 844 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
services:
app:
build:
context: ..
dockerfile: ./.devcontainer/Dockerfile
depends_on:
db:
condition: service_healthy
volumes:
- ..:/workspace:cached
# Overrides default command so things don't shut down after the process ends.
command: sleep infinity
# Runs app on the same network as the database container, allows "forwardPorts" in devcontainer.json function.
network_mode: service:db
db:
image: postgres:14
restart: unless-stopped
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_DB: app
POSTGRES_USER: app_user
POSTGRES_PASSWORD: app_password
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d relecloud"]
interval: 5s
timeout: 5s
retries: 5
volumes:
postgres-data: