-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
51 lines (48 loc) · 1.1 KB
/
docker-compose.yml
File metadata and controls
51 lines (48 loc) · 1.1 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
version: '3.8'
services:
# Redis Cache
redis:
image: redis:7-alpine
container_name: weathernote-redis
ports:
- "6379:6379"
volumes:
- redis_data:/data
command: redis-server --appendonly yes --maxmemory 512mb --maxmemory-policy allkeys-lru
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 3
restart: unless-stopped
# Backend API
backend:
build:
context: .
dockerfile: Dockerfile
container_name: weathernote-backend
ports:
- "8080:8080"
environment:
- PORT=8080
- REDIS_URL=redis://redis:6379
- OPEN_METEO_BASE_URL=https://api.open-meteo.com
- CACHE_TTL_SECONDS=600
- COORDINATE_PRECISION=0.1
- RATE_LIMIT_PER_MINUTE=60
- PREWARM_INTERVAL_MINUTES=10
- RUST_LOG=info
depends_on:
redis:
condition: service_healthy
restart: unless-stopped
deploy:
resources:
limits:
cpus: '2'
memory: 1G
reservations:
cpus: '0.5'
memory: 256M
volumes:
redis_data: