This commit is contained in:
Mateusz Gruszczyński
2025-09-22 08:43:53 +02:00
parent 2a065aba3b
commit d102354750
2 changed files with 17 additions and 12 deletions

View File

@@ -1,13 +1,9 @@
FROM python:3.13-slim
WORKDIR /app
COPY requirements.txt requirements.txt
RUN apt-get update && apt-get install -y build-essential && \
pip install --upgrade pip && pip install -r requirements.txt
COPY . .
RUN mkdir -p /app/instance
EXPOSE 5583
CMD ["python", "run_waitress.py"]
CMD ["python3", "run_waitress.py"]

View File

@@ -1,12 +1,21 @@
version: '3.8'
services:
app:
build:
context: .
dockerfile: Dockerfile
routeros_backup:
build: .
container_name: routeros_backup
ports:
- "5583:5583"
healthcheck:
test:
[
"CMD",
"python",
"-c",
"import urllib.request; import sys; sys.exit(0) if urllib.request.urlopen('http://localhost:5583/login').getcode() == 200 else sys.exit(1)"
]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
volumes:
- ./instance:/app/instance
- .:/app
restart: unless-stopped