This commit is contained in:
Mateusz Gruszczyński
2025-09-22 08:16:53 +02:00
parent 73a4e6149a
commit 1064476c63
2 changed files with 21 additions and 16 deletions

View File

@@ -1,11 +1,7 @@
FROM python:3.13-slim FROM python:3.13-slim
WORKDIR /app WORKDIR /app
COPY requirements.txt requirements.txt
COPY requirements.txt .
RUN pip install --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt RUN pip install --no-cache-dir -r requirements.txt
COPY . . COPY . .
RUN chmod +x run_waitress.py
CMD ["python", "run_waitress.py"] ENTRYPOINT ["python3", "run_waitress.py"]

View File

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