-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.local.yml
More file actions
104 lines (98 loc) · 2.09 KB
/
Copy pathdocker-compose.local.yml
File metadata and controls
104 lines (98 loc) · 2.09 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
services:
frontend:
build:
context: ./frontend
args:
VITE_BACKEND_URL: http://localhost:8080
container_name: styleo-frontend
ports:
- "4173:4173"
networks:
- styleo-net
restart: unless-stopped
healthcheck:
test:
[
"CMD",
"wget",
"--no-verbose",
"--tries=1",
"--spider",
"http://localhost:4173/",
]
interval: 30s
timeout: 3s
retries: 3
start_period: 5s
backend:
build: ./backend
container_name: styleo-backend
env_file:
- backend/.env
environment:
FRONTEND_URL: http://localhost:4173
command: >
uv run uvicorn main:app --host 0.0.0.0 --port 8080
ports:
- "8080:8080"
depends_on:
redis:
condition: service_healthy
networks:
- styleo-net
restart: unless-stopped
worker:
build: ./backend
container_name: styleo-worker
env_file:
- backend/.env
command: >
uv run taskiq worker workers.main:broker
depends_on:
redis:
condition: service_healthy
networks:
- styleo-net
restart: unless-stopped
redis:
image: redis:latest
container_name: styleo-redis
ports:
- "6379:6379"
env_file:
- backend/.env
command: >
sh -c 'if [ -n "$$REDIS_PASSWORD" ]; then
exec redis-server --appendonly no --requirepass "$$REDIS_PASSWORD"
else
exec redis-server --appendonly no
fi'
volumes:
- redis_data:/data
networks:
- styleo-net
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 5
start_period: 10s
restart: unless-stopped
redis-insight:
image: redis/redisinsight:latest
container_name: styleo-redis-insight
ports:
- "5540:5540"
depends_on:
- redis
volumes:
- redis_insight_data:/data
networks:
- styleo-net
restart: unless-stopped
volumes:
redis_data:
redis_insight_data:
networks:
styleo-net:
driver: bridge