Repository navigation
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
79 lines (75 loc) · 2.33 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
79 lines (75 loc) · 2.33 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# ============================================================
# Local Development Stack - PostgreSQL + PRM Application
# ============================================================
# Complete development environment with database and app.
# All configuration is self-contained - no .env file needed.
#
# USAGE:
# Start: docker-compose -f docker-compose.dev.yml up -d
# Stop: docker-compose -f docker-compose.dev.yml down
# Logs: docker-compose -f docker-compose.dev.yml logs -f
# Reset: docker-compose -f docker-compose.dev.yml down -v
#
# ACCESS:
# App: http://localhost:5001
# Database: localhost:5432
#
# NOTE: Uses port 5001 to avoid conflicts with native development (port 5000)
# and production docker-compose.yml
# ============================================================
version: '3.8'
services:
# PostgreSQL Database
postgres:
image: postgres:15-alpine
container_name: prm-postgres-dev
environment:
POSTGRES_USER: prm
POSTGRES_PASSWORD: prm_dev_password
POSTGRES_DB: people_crm
ports:
- "5432:5432"
volumes:
- prm_dev_postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U prm -d people_crm"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
# People Manager CRM Application
app:
build:
context: .
dockerfile: Dockerfile
container_name: prm-app-dev
ports:
- "5001:5000"
environment:
# Database connection (uses Docker service name)
DATABASE_URL: postgresql://prm:prm_dev_password@postgres:5432/people_crm
# Session configuration
SESSION_SECRET: dev-session-secret-for-local-development-only
# Node environment
NODE_ENV: development
# S3 Storage (optional - leave empty to disable image uploads)
S3_ENDPOINT: ""
S3_BUCKET: ""
S3_ACCESS_KEY: ""
S3_SECRET_KEY: ""
volumes:
# Mount source code for hot reload
- .:/app
- /app/node_modules
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:5000/api/setup/status"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
restart: unless-stopped
volumes:
prm_dev_postgres_data: