-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
78 lines (71 loc) · 1.8 KB
/
docker-compose.yml
File metadata and controls
78 lines (71 loc) · 1.8 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
version: '3.8'
services:
# PostgreSQL Database
postgres:
image: postgres:14-alpine
container_name: finfusion-postgres
restart: unless-stopped
environment:
POSTGRES_DB: finfusion
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres123
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- finfusion-network
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
# Backend API
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: finfusion-backend
restart: unless-stopped
environment:
NODE_ENV: production
PORT: 5000
DATABASE_URL: postgresql://postgres:postgres123@postgres:5432/finfusion
JWT_SECRET: your-super-secret-jwt-key-change-this-in-production
JWT_EXPIRES_IN: 7d
FRONTEND_URL: http://localhost:3000
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID:-}
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET:-}
ports:
- "5000:5000"
depends_on:
postgres:
condition: service_healthy
networks:
- finfusion-network
volumes:
- ./backend:/app
- /app/node_modules
command: sh -c "npx prisma migrate deploy && npx prisma db seed && npm start"
# Frontend (React)
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: finfusion-frontend
restart: unless-stopped
environment:
REACT_APP_API_URL: http://localhost:5000/api
REACT_APP_GOOGLE_CLIENT_ID: ${REACT_APP_GOOGLE_CLIENT_ID:-}
ports:
- "3000:80"
depends_on:
- backend
networks:
- finfusion-network
networks:
finfusion-network:
driver: bridge
volumes:
postgres_data:
driver: local