Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
81 lines (75 loc) · 1.84 KB
/
Copy pathdocker-compose.yml
File metadata and controls
81 lines (75 loc) · 1.84 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
74
75
76
77
78
79
80
81
version: "3.9"
services:
postgres:
image: ngosang/timescaledb-postgis:2.24.0-pg16-postgis3.6
container_name: rie-postgres
environment:
POSTGRES_USER: rie_user
POSTGRES_PASSWORD: rie_password
POSTGRES_DB: rie_db
ports:
- "5433:5432"
volumes:
- postgres_data:/home/postgres/pgdata/data
- ./backend/initdb:/docker-entrypoint-initdb.d
healthcheck:
test: ["CMD-SHELL", "pg_isready -U rie_user -d rie_db"]
interval: 10s
timeout: 5s
retries: 10
redis:
image: redis:7-alpine
container_name: rie-redis
ports:
- "6380:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 10
backend:
build:
context: .
dockerfile: Dockerfile
container_name: rie-backend
command: uvicorn backend.app.main:app --host 0.0.0.0 --port 8000
env_file:
- .env.example
ports:
- "8001:8000"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/v1/health/live"]
interval: 15s
timeout: 5s
retries: 8
worker:
build:
context: .
dockerfile: Dockerfile
container_name: rie-worker
command: celery -A backend.app.worker.celery_app.celery_app worker -Q analytics --loglevel=info
env_file:
- .env.example
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
frontend:
image: node:20-alpine
container_name: rie-frontend
working_dir: /app
volumes:
- ./frontend:/app
command: sh -c "npm install && npm run dev -- --host 0.0.0.0 --port 5173"
ports:
- "5173:5173"
depends_on:
- backend
volumes:
postgres_data: