-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
125 lines (122 loc) · 2.55 KB
/
docker-compose.yaml
File metadata and controls
125 lines (122 loc) · 2.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
services:
database:
image: paradedb/paradedb:latest
expose:
- "5432"
ports:
- "5432:5432"
volumes:
- database:/var/lib/postgresql
env_file:
- backend/.env
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER"]
interval: 2s
timeout: 2s
retries: 10
networks:
- django-liberty
backend:
build:
context: backend
expose:
- "8000"
ports:
- "8000:8000"
env_file:
- backend/.env
volumes:
- backend:/app
healthcheck:
test:
[
"CMD",
"python",
"-c",
"import urllib.request; urllib.request.urlopen('http://127.0.0.1:8000/')",
]
interval: 2s
timeout: 2s
retries: 10
depends_on:
database:
condition: service_healthy
valkey:
condition: service_healthy
networks:
- django-liberty
celery_worker:
build:
context: backend
env_file:
- backend/.env
environment:
IS_CELERY: "true"
CELERY_BROKER_URL: ${CELERY_BROKER_URL:-redis://valkey:6379/0}
CELERY_RESULT_BACKEND: ${CELERY_RESULT_BACKEND:-redis://valkey:6379/1}
command:
[
"uv",
"run",
"--no-sync",
"celery",
"-A",
"main.celery:app",
"worker",
"-l",
"info",
]
depends_on:
database:
condition: service_healthy
valkey:
condition: service_healthy
volumes:
- backend:/app
networks:
- django-liberty
frontend:
build:
context: frontend
args:
BACKEND_URL: ${BACKEND_URL:-http://127.0.0.1:8000}
NUXT_URL: ${NUXT_URL:-http://127.0.0.1:3000}
expose:
- "3000"
ports:
- "3000:3000"
environment:
BACKEND_URL: ${BACKEND_URL:-http://127.0.0.1:8000}
NUXT_URL: ${NUXT_URL:-http://127.0.0.1:3000}
healthcheck:
test:
[
"CMD",
"bun",
"--eval",
"fetch('http://127.0.0.1:3000/').then((response) => { if (!response.ok) process.exit(1) }).catch(() => process.exit(1))",
]
interval: 2s
timeout: 2s
retries: 10
depends_on:
backend:
condition: service_healthy
networks:
- django-liberty
valkey:
image: valkey/valkey:latest
ports:
- 6379:6379
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 2s
networks:
- django-liberty
networks:
django-liberty:
driver: bridge
volumes:
backend:
database:
frontend: