-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
54 lines (50 loc) · 1.26 KB
/
docker-compose.yml
File metadata and controls
54 lines (50 loc) · 1.26 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
version: '3.8'
services:
db:
image: postgres:15-alpine
environment:
POSTGRES_DB: hospiplan
POSTGRES_USER: hospiuser
POSTGRES_PASSWORD: hospipass
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U hospiuser -d hospiplan" ]
interval: 5s
timeout: 5s
retries: 5
backend:
build: ./backend
environment:
DEBUG: "True"
SECRET_KEY: ${SECRET_KEY:-django-insecure-dev-key-change-in-production}
DATABASE_URL: postgres://hospiuser:hospipass@db:5432/hospiplan
ALLOWED_HOSTS: "localhost,127.0.0.1,0.0.0.0"
JWT_ACCESS_TOKEN_LIFETIME_MINUTES: "60"
JWT_REFRESH_TOKEN_LIFETIME_DAYS: "7"
ports:
- "8000:8000"
volumes:
- ./backend:/app
depends_on:
db:
condition: service_healthy
command: >
sh -c "python manage.py migrate &&
python manage.py runserver 0.0.0.0:8000"
frontend:
build: ./frontend
ports:
- "5173:5173"
volumes:
- ./frontend:/app
- /app/node_modules
environment:
VITE_API_URL: "http://localhost:8000/api"
depends_on:
- backend
command: npm run dev -- --host
volumes:
postgres_data: