-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
34 lines (32 loc) · 813 Bytes
/
docker-compose.yml
File metadata and controls
34 lines (32 loc) · 813 Bytes
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
services:
postgres:
image: postgres:16-alpine
container_name: pec_postgres
restart: always
environment:
POSTGRES_DB: "pec"
POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "postgres"
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
backend:
build:
context: .
dockerfile: ./server/Dockerfile
container_name: pec_backend
restart: always
ports:
- "4000:4000"
environment:
JWT_SECRET: "pec_secret_key_2026"
PORT: "4000"
NODE_ENV: "development"
DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/pec"
command: >
sh -c " npx prisma db push --accept-data-loss && npm run db:seed && npm run start:dev "
depends_on:
- postgres
volumes:
postgres_data: