-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
73 lines (68 loc) · 1.55 KB
/
docker-compose.yml
File metadata and controls
73 lines (68 loc) · 1.55 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
version: '3.8'
services:
# PostgreSQL Database
postgres:
image: postgres:15-alpine
container_name: taskdb
environment:
POSTGRES_USER: taskuser
POSTGRES_PASSWORD: taskpass
POSTGRES_DB: taskdb
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- tasknetwork
healthcheck:
test: ["CMD-SHELL", "pg_isready -U taskuser -d taskdb"]
interval: 5s
timeout: 10s
retries: 20
start_period: 10s
# Backend API
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: task_api
command: uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
ports:
- "8000:8000"
environment:
DATABASE_URL: postgresql://taskuser:taskpass@postgres:5432/taskdb
SECRET_KEY: your-secret-key-change-in-production
ALGORITHM: HS256
ACCESS_TOKEN_EXPIRE_MINUTES: 30
APP_ENV: development
DEBUG: "True"
LOG_LEVEL: INFO
volumes:
- ./backend:/app
depends_on:
postgres:
condition: service_healthy
networks:
- tasknetwork
# Frontend
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: task_ui
ports:
- "3000:3000"
environment:
REACT_APP_API_URL: http://localhost:8000/api/v1
volumes:
- ./frontend/src:/app/src
- ./frontend/public:/app/public
depends_on:
- backend
networks:
- tasknetwork
volumes:
postgres_data:
networks:
tasknetwork:
driver: bridge