-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
74 lines (70 loc) · 1.52 KB
/
docker-compose.yml
File metadata and controls
74 lines (70 loc) · 1.52 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
services:
db:
image: postgres:16-alpine
environment:
POSTGRES_DB: tigerpath
POSTGRES_USER: tigerpath
POSTGRES_PASSWORD: tigerpath
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U tigerpath"]
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
command:
[
"redis-server",
"--maxmemory",
"${REDIS_MAXMEMORY:-256mb}",
"--maxmemory-policy",
"${REDIS_MAXMEMORY_POLICY:-allkeys-lru}",
]
ports:
- "6379:6379"
volumes:
- redisdata:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
backend:
build:
context: .
dockerfile: Dockerfile
command: python manage.py runserver 0.0.0.0:8000
ports:
- "8000:8000"
env_file:
- .env
environment:
DATABASE_URL: postgres://tigerpath:tigerpath@db:5432/tigerpath
REDIS_URL: redis://redis:6379/1
volumes:
- .:/opt/tigerpath
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
frontend:
build:
context: .
dockerfile: Dockerfile
target: frontend
command: bun run dev --host 0.0.0.0
ports:
- "3000:3000"
volumes:
- ./frontend:/opt/tigerpath/frontend
- /opt/tigerpath/frontend/node_modules
depends_on:
- backend
volumes:
pgdata:
redisdata: