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 FROM python:3.13-slim
WORKDIR /app WORKDIR /app
COPY requirements.txt requirements.txt COPY requirements.txt requirements.txt
RUN apt-get update && apt-get install -y build-essential && \ RUN apt-get update && apt-get install -y build-essential && \
pip install --upgrade pip && pip install -r requirements.txt pip install --upgrade pip && pip install -r requirements.txt
COPY . . COPY . .
RUN mkdir -p /app/instance RUN mkdir -p /app/instance
CMD ["python3", "run_waitress.py"]
EXPOSE 5583
CMD ["python", "run_waitress.py"]

View File

@@ -1,12 +1,21 @@
version: '3.8'
services: services:
app: routeros_backup:
build: build: .
context: . container_name: routeros_backup
dockerfile: Dockerfile
ports: ports:
- "5583:5583" - "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: volumes:
- ./instance:/app/instance - .:/app
restart: unless-stopped restart: unless-stopped