-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
70 lines (64 loc) · 1.66 KB
/
docker-compose.yml
File metadata and controls
70 lines (64 loc) · 1.66 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
services:
frontend:
build: ./frontend
ports:
- "3000:3000"
volumes:
- ./frontend:/app
- /app/node_modules
environment:
- REACT_APP_API_URL=http://localhost:8000
depends_on:
- backend
backend:
build: ./backend
ports:
- "8000:8000"
volumes:
- ./backend:/app
environment:
# Database Configuration
- DATABASE_URL=postgresql://leapcode:leapcode@db:5432/leapcode
- DB_POOL_SIZE=10
- DB_MAX_OVERFLOW=20
- DB_POOL_TIMEOUT=30
# Security Configuration
- SECRET_KEY=14e8907484970b368c95923ac502c07b234e9b52afed1196507660cbe4e7480c
- REFRESH_TOKEN_SECRET_KEY=another_secure_secret_key_for_refresh_tokens
- ACCESS_TOKEN_EXPIRE_MINUTES=30
- REFRESH_TOKEN_EXPIRE_DAYS=7
# Rate Limiting Configuration
- RATE_LIMIT_ENABLED=true
- RATE_LIMIT_REQUESTS=100
- RATE_LIMIT_PERIOD_SECONDS=60
# Application Configuration
- ENVIRONMENT=development
- DEBUG=true
depends_on:
- db
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 5s
db:
image: postgres:13
environment:
- POSTGRES_USER=leapcode
- POSTGRES_PASSWORD=leapcode
- POSTGRES_DB=leapcode
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U leapcode"]
interval: 10s
timeout: 5s
retries: 5
volumes:
postgres_data:
driver: local