diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000000000000000000000000000000000000..21b5fb0b1b7f242c143ab7e676b35c1bf425bcad --- /dev/null +++ b/.dockerignore @@ -0,0 +1,30 @@ +# Configuration files +servers.json + +# Version control +.git +.gitignore + +# Python +__pycache__ +*.pyc +*.pyo +*.pyd +.Python +env/ +venv/ +.venv/ +.env + +# IDE +.vscode/ +.idea/ +*.swp +*.swo + +# Logs +*.log + +# Docker +Dockerfile +.dockerignore \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..942f337969ad4768ec11452d638d956fd32bb612 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM python:3.12-slim + +WORKDIR /app + +COPY . . + +RUN pip install --no-cache-dir . gunicorn eventlet + +RUN useradd -m appuser && chown -R appuser:appuser /app +USER appuser + +EXPOSE 5000 + +CMD ["gunicorn", "--worker-class", "eventlet", "-w", "1", "-b", "0.0.0.0:5000", "app:app"] \ No newline at end of file