-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
68 lines (65 loc) · 1.89 KB
/
docker-compose.dev.yml
File metadata and controls
68 lines (65 loc) · 1.89 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
services:
postgres:
image: postgres:16-alpine
container_name: pec_postgres_dev
restart: unless-stopped
ports:
- "5432:5432"
environment:
POSTGRES_DB: "pec"
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
volumes:
- postgres_dev_data:/var/lib/postgresql/data
backend:
image: node:20-alpine
container_name: pec_backend_dev
working_dir: /app
restart: unless-stopped
ports:
- "4000:4000"
environment:
JWT_SECRET: "pec_secret_key_2026"
PORT: "4000"
NODE_ENV: "development"
CORS_ORIGINS: "http://localhost:3000,http://localhost:3001"
DB_HOST: "postgres"
NODE_PATH: "/app/node_modules"
DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/pec"
volumes:
- ./server:/app
- ./shared:/shared
- backend_node_modules:/app/node_modules
command: >
sh -c " npm install && npx prisma generate && npx prisma db push --accept-data-loss && npm run db:seed && npm run start:dev "
depends_on:
- postgres
frontend:
image: node:20-alpine
container_name: pec_frontend_dev
profiles:
- frontend
working_dir: /app
restart: unless-stopped
ports:
- "3000:3000"
environment:
NEXT_PUBLIC_API_URL: "http://localhost:3000/api"
INTERNAL_API_URL: "http://backend:4000"
GITHUB_AI_API_KEY: "${GITHUB_AI_API_KEY:-}"
VITE_API_URL: "http://localhost:4000"
NEXT_TELEMETRY_DISABLED: "1"
CHOKIDAR_USEPOLLING: "true"
volumes:
- ./:/app
- frontend_node_modules:/app/node_modules
- /app/archive
- /app/server
command: >
sh -c " if [ ! -d node_modules/next ]; then npm install --legacy-peer-deps; fi && npm run dev -- --turbopack --hostname 0.0.0.0 --port 3000 "
depends_on:
- backend
volumes:
postgres_dev_data:
backend_node_modules:
frontend_node_modules: