docker
This commit is contained in:
@@ -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"]
|
@@ -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
|
Reference in New Issue
Block a user