-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
68 lines (65 loc) · 2.1 KB
/
Copy pathdocker-compose.yml
File metadata and controls
68 lines (65 loc) · 2.1 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
services:
app:
build: ./backend
ports:
- "8000:8000"
env_file:
- .env
environment:
- TARGET_VERSION=${TARGET_VERSION}
depends_on:
- redis
restart: always
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request,sys; sys.exit(0 if urllib.request.urlopen('http://localhost:8000/docs', timeout=2).status==200 else 1)"]
interval: 30s
timeout: 5s
retries: 3
start_period: 20s
volumes:
# C-6: ya no se monta ./backend:/app (pisaba el código del Dockerfile).
# Solo exponemos datos y binarios que sí deben venir del host.
- ./data:/app/data
- ./updates:/app/updates:ro
- ./backend/Preset Perenes IPs VPNs Solinftec.txt:/app/Preset Perenes IPs VPNs Solinftec.txt:ro
- ./backend/Preset Grãos IPs VPNs Solinftec.txt:/app/Preset Grãos IPs VPNs Solinftec.txt:ro
- ./backend/Preset Cana IPs VPNs Solinftec.txt:/app/Preset Cana IPs VPNs Solinftec.txt:ro
# network_mode: host
worker:
build: ./backend
command: celery -A tasks worker --loglevel=info -c 8
env_file:
- .env
environment:
- TARGET_VERSION=${TARGET_VERSION}
depends_on:
- redis
restart: always
healthcheck:
test: ["CMD", "celery", "-A", "tasks", "inspect", "ping", "-t", "5"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
volumes:
- ./data:/app/data
- ./updates:/app/updates:ro
- ./backend/Preset Perenes IPs VPNs Solinftec.txt:/app/Preset Perenes IPs VPNs Solinftec.txt:ro
- ./backend/Preset Grãos IPs VPNs Solinftec.txt:/app/Preset Grãos IPs VPNs Solinftec.txt:ro
- ./backend/Preset Cana IPs VPNs Solinftec.txt:/app/Preset Cana IPs VPNs Solinftec.txt:ro
# network_mode: host
redis:
image: redis:7-alpine
restart: always
# I-6: persistencia de la cola de Celery
command: ["redis-server", "--appendonly", "yes"]
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 5s
retries: 3
# network_mode: host
volumes:
redis-data: