forked from Dushyant-rahangdale/OpsKnight
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
66 lines (63 loc) · 2.03 KB
/
docker-compose.dev.yml
File metadata and controls
66 lines (63 loc) · 2.03 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
services:
opsknight-db:
image: postgres:15-alpine
container_name: opsknight_postgres_dev
restart: unless-stopped
mem_limit: 2g
environment:
POSTGRES_USER: opsknight
POSTGRES_PASSWORD: opsknight_secure_password_change_me
POSTGRES_DB: opsknight_db
ports:
- '5432:5432'
volumes:
- opsknight_postgres_dev_data:/var/lib/postgresql/data
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U opsknight -d opsknight_db']
interval: 10s
timeout: 5s
retries: 5
networks:
- opsknight-dev-network
opsknight-app:
build:
context: .
dockerfile: Dockerfile.dev
container_name: opsknight_app_dev
restart: unless-stopped
ports:
- '3000:3000'
environment:
- NODE_ENV=development
# Database connection pool settings (40 connections, 30s timeout)
- DATABASE_URL=postgresql://opsknight:opsknight_secure_password_change_me@opsknight-db:5432/opsknight_db?connection_limit=40&pool_timeout=30
- NEXTAUTH_URL=http://localhost:3000
- NEXTAUTH_SECRET=dev-secret-key-for-development-only
- NEXTAUTH_SECRET=dev-secret-key-for-development-only
# NOTE: Notification providers (Twilio, Email, Push) are configured via UI
# Environment variables are NOT used - configure at Settings → System → Notification Providers
volumes:
# Mount source code for hot reloading
- ./src:/app/src
- ./public:/app/public
- ./prisma:/app/prisma
- ./package.json:/app/package.json
- ./tsconfig.json:/app/tsconfig.json
- ./next.config.ts:/app/next.config.ts
- ./middleware.ts:/app/middleware.ts
# Exclude node_modules to use container's version
- /app/node_modules
- /app/.next
depends_on:
opsknight-db:
condition: service_healthy
networks:
- opsknight-dev-network
command: >
sh -c "npx prisma generate && ./docker-entrypoint.sh"
volumes:
opsknight_postgres_dev_data:
driver: local
networks:
opsknight-dev-network:
driver: bridge