forked from rohitdash08/FinMind
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
58 lines (54 loc) · 1.52 KB
/
Copy pathdocker-compose.yml
File metadata and controls
58 lines (54 loc) · 1.52 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
services:
postgres:
image: postgres:16
environment:
POSTGRES_USER: ${POSTGRES_USER:-finmind}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-finmind}
POSTGRES_DB: ${POSTGRES_DB:-finmind}
ports: ["5432:5432"]
volumes: ["pgdata:/var/lib/postgresql/data"]
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-finmind} -d ${POSTGRES_DB:-finmind}"]
interval: 10s
timeout: 5s
retries: 10
redis:
image: redis:7
ports: ["6379:6379"]
restart: unless-stopped
backend:
build: ./packages/backend
env_file:
- .env
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
ports: ["8000:8000"]
volumes:
- ./packages/backend/app:/app/app
- ./packages/backend/wsgi.py:/app/wsgi.py
- ./packages/backend/tests:/app/tests
- ./.flake8:/app/.flake8:ro
- ./.bandit:/app/.bandit:ro
command: sh -c "python -m flask --app wsgi:app init-db && gunicorn --reload --workers=2 --threads=4 --bind 0.0.0.0:8000 wsgi:app"
restart: unless-stopped
frontend-dev:
image: node:20-alpine
working_dir: /app
env_file:
- .env
environment:
- CHOKIDAR_USEPOLLING=true
- WATCHPACK_POLLING=true
volumes:
- ./app:/app
- /app/node_modules
ports: ["5173:5173"]
depends_on: [backend]
command: sh -c "npm install && npm run dev -- --host 0.0.0.0 --port 5173"
restart: unless-stopped
volumes:
pgdata: