-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
50 lines (47 loc) · 1.06 KB
/
docker-compose.yml
File metadata and controls
50 lines (47 loc) · 1.06 KB
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
services:
db:
image: postgres:16-alpine
environment:
POSTGRES_DB: nala
POSTGRES_USER: nala
POSTGRES_PASSWORD: nala
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
- ./server/src/db/migrations/001-initial-schema.sql:/docker-entrypoint-initdb.d/001-initial-schema.sql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U nala"]
interval: 2s
timeout: 5s
retries: 10
server:
build:
context: .
dockerfile: server/Dockerfile
ports:
- "3001:3001"
environment:
DATABASE_URL: postgresql://nala:nala@db:5432/nala
PORT: "3001"
depends_on:
db:
condition: service_healthy
volumes:
- ./server/src:/app/server/src
- ./shared:/app/shared
client:
build:
context: .
dockerfile: client/Dockerfile
ports:
- "5173:5173"
environment:
API_URL: http://server:3001
depends_on:
- server
volumes:
- ./client/src:/app/client/src
- ./shared:/app/shared
volumes:
pgdata: