Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
99 lines (94 loc) · 3.4 KB
/
Copy pathdocker-compose.yml
File metadata and controls
99 lines (94 loc) · 3.4 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
version: "3.9"
# =============================================================================
# Volqan — Development Docker Compose
# =============================================================================
# Services:
# volqan — The Volqan application (API + Admin)
# postgres — PostgreSQL 16 database
# =============================================================================
services:
# ---------------------------------------------------------------------------
# Volqan application
# ---------------------------------------------------------------------------
volqan:
build:
context: .
dockerfile: Dockerfile
target: builder # Use builder stage for development (includes source maps)
container_name: volqan-app
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
environment:
NODE_ENV: development
PORT: "3000"
ADMIN_PORT: "3001"
DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/volqan?schema=public"
JWT_SECRET: "dev-jwt-secret-change-in-production-immediately"
SESSION_SECRET: "dev-session-secret-change-in-production-immediately"
VOLQAN_UPLOAD_DIR: "/app/public/uploads"
NEXT_PUBLIC_APP_URL: "http://localhost:3001"
# Bazarix marketplace integration (optional in dev)
# BAZARIX_LICENSE_KEY: ""
ports:
- "3000:3000" # API
- "3001:3001" # Admin UI
volumes:
# Mount source for hot-reload in development
- .:/app
# Persist node_modules inside container (prevents host/container conflicts)
- /app/node_modules
- /app/packages/admin/.next
# Persist uploads
- volqan-uploads:/app/public/uploads
command: pnpm dev
networks:
- volqan-network
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost:3000/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
# ---------------------------------------------------------------------------
# PostgreSQL database
# ---------------------------------------------------------------------------
# WARNING: The default credentials below are for development only.
# In production, use a strong, unique password via environment variables.
# ---------------------------------------------------------------------------
postgres:
image: postgres:16-alpine
container_name: volqan-postgres
restart: unless-stopped
environment:
POSTGRES_DB: volqan
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
PGDATA: /var/lib/postgresql/data/pgdata
ports:
- "5432:5432" # Expose to host for local Prisma Studio / migrations
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- volqan-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -d volqan"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
# =============================================================================
# Volumes
# =============================================================================
volumes:
postgres-data:
driver: local
volqan-uploads:
driver: local
# =============================================================================
# Networks
# =============================================================================
networks:
volqan-network:
driver: bridge