docker
This commit is contained in:
@@ -1,11 +1,7 @@
|
|||||||
FROM python:3.13-slim
|
FROM python:3.13-slim
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
COPY requirements.txt .
|
COPY requirements.txt .
|
||||||
RUN pip install --upgrade pip
|
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 . .
|
||||||
|
CMD ["python3", "run_waitress.py"]
|
||||||
CMD ["python", "run_waitress.py"]
|
|
||||||
|
@@ -1,15 +1,23 @@
|
|||||||
version: '3.8'
|
|
||||||
|
|
||||||
services:
|
services:
|
||||||
app:
|
routeros_backup:
|
||||||
build:
|
build: .
|
||||||
context: .
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
container_name: routeros_backup
|
container_name: routeros_backup
|
||||||
ports:
|
ports:
|
||||||
- "5581:5581"
|
- "5581:5581"
|
||||||
environment:
|
healthcheck:
|
||||||
- FLASK_ENV=production
|
test:
|
||||||
restart: unless-stopped
|
[
|
||||||
|
"CMD",
|
||||||
|
"python",
|
||||||
|
"-c",
|
||||||
|
"import urllib.request; import sys; sys.exit(0) if urllib.request.urlopen('http://localhost:5581/login').getcode() == 200 else sys.exit(1)"
|
||||||
|
]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 3
|
||||||
|
start_period: 10s
|
||||||
volumes:
|
volumes:
|
||||||
- ./data:/data
|
- .:/app
|
||||||
|
- ./instance:/app/instance
|
||||||
|
- ./data:/app/data
|
||||||
|
restart: unless-stopped
|
@@ -4,8 +4,6 @@ passlib
|
|||||||
paramiko
|
paramiko
|
||||||
APScheduler
|
APScheduler
|
||||||
requests
|
requests
|
||||||
#gunicorn
|
|
||||||
flask_wtf
|
flask_wtf
|
||||||
gevent
|
gevent
|
||||||
#croniter
|
|
||||||
waitress
|
waitress
|
Reference in New Issue
Block a user