-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
34 lines (32 loc) · 1.04 KB
/
Copy pathdocker-compose.yml
File metadata and controls
34 lines (32 loc) · 1.04 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
version: '3.8'
services:
api:
build: .
container_name: ruc-api
restart: unless-stopped
ports:
- "8082:8000"
volumes:
- ./data:/app/data
environment:
- API_HOST=0.0.0.0
- API_PORT=8000
# - DB_PATH=/app/data/ruc.sqlite # Opcional, el default funciona bien
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; import sys; response = urllib.request.urlopen('http://localhost:8000/health'); sys.exit(0) if response.getcode() == 200 else sys.exit(1)"]
interval: 30s
timeout: 10s
retries: 3
downloader:
build: .
container_name: ruc-downloader
volumes:
- ./data:/app/data
- ./downloads:/app/downloads
# Sobrescribir el comando para ejecutar el downloader
command: python -m src.main --env
environment:
- ZIP_DOWNLOAD_URL=https://www.dnit.gov.py/web/portal-institucional/listado-de-ruc-con-sus-equivalencias
- ZIP_OUTPUT_DIR=/app/downloads
# No reiniciar automáticamente ya que es un trabajo batch
restart: "no"