-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
38 lines (36 loc) · 1.07 KB
/
Copy pathdocker-compose.yml
File metadata and controls
38 lines (36 loc) · 1.07 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
name: kiwi-engine
services:
# 1. THE BRAIN (Your Code)
kiwi:
image: abdallahthegreatest/kiwi-engine:latest
container_name: kiwi-logic
depends_on:
browser:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "/opt/venv/bin/python -c \"import urllib.request; urllib.request.urlopen('http://localhost:8000/health', timeout=5)\""]
interval: 15s
timeout: 5s
retries: 3
start_period: 10s
ports:
- "8000:8000"
environment:
# Magic string that tells Python to look at the other container
- PLAYWRIGHT_WS_ENDPOINT=ws://browser:3000
volumes:
- ./kiwi_data:/data
command: ["server", "--host", "0.0.0.0"]
restart: always
# 2. THE MUSCLE (The Browser)
browser:
# Now pulls YOUR optimized image
image: abdallahthegreatest/kiwi-browser:v1.57.0
container_name: kiwi-browser
expose:
- "3000"
healthcheck:
# Now we can check the connection properly
test: ["CMD-SHELL", "curl -f http://localhost:3000/ || exit 1"]
interval: 10s
restart: always