-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
44 lines (41 loc) · 1.07 KB
/
docker-compose.dev.yml
File metadata and controls
44 lines (41 loc) · 1.07 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
# Docker development environment
# Usage: docker compose up --build
#
# For local Docker (same machine), uncomment the volume mounts below
# to enable hot-reload. For remote Docker contexts (SSH), leave them
# commented out — the code is baked into the image at build time.
services:
db:
image: postgres:16-alpine
environment:
POSTGRES_DB: app
POSTGRES_USER: app
POSTGRES_PASSWORD: devpassword
volumes:
- pgdata:/var/lib/postgresql/data
ports:
- "${DB_PORT:-5433}:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U app"]
interval: 5s
timeout: 3s
retries: 5
server:
build:
context: .
dockerfile: docker/Dockerfile.server.dev
environment:
DATABASE_URL: postgres://app:devpassword@db:5432/app
NODE_ENV: development
PORT: "3000"
ports:
- "3000:3000"
# Uncomment for local Docker with hot-reload:
# volumes:
# - ./server/src:/app/src
# - ./server/prisma:/app/prisma
depends_on:
db:
condition: service_healthy
volumes:
pgdata: