-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
47 lines (44 loc) · 992 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
38
39
40
41
42
43
44
45
46
47
services:
app:
build:
context: .
dockerfile: Dockerfile
command: npm run dev
entrypoint: ./entrypoint.sh
volumes:
- .:/app
- ./node_modules:/app/node_modules
ports:
- "3000:3000"
- "5555:5555" # Prisma Studio, optional
env_file:
- .env
environment:
POSTGRES_URI: postgres://prisma:your_password@db:5432/prisma
depends_on:
- db
networks:
- koala-network
db:
image: postgres:latest
restart: unless-stopped
environment:
POSTGRES_USER: prisma
POSTGRES_PASSWORD: your_password
POSTGRES_DB: prisma
volumes:
- db-data:/var/lib/postgresql/data
ports:
- "5432:5432" # To access the DB externally via pgAdmin and other tools
networks:
- koala-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U prisma"]
interval: 10s
timeout: 5s
retries: 5
volumes:
db-data:
networks:
koala-network:
driver: bridge