From 0f38fb70e5e764edb97c5d5de83143439d11dacf Mon Sep 17 00:00:00 2001
From: Jonathan Klimt <jonathan.klimt@eonerc.rwth-aachen.de>
Date: Mon, 7 Apr 2025 13:32:10 +0200
Subject: [PATCH] Added Dockerfile

---
 .dockerignore | 30 ++++++++++++++++++++++++++++++
 Dockerfile    | 14 ++++++++++++++
 2 files changed, 44 insertions(+)
 create mode 100644 .dockerignore
 create mode 100644 Dockerfile

diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000..21b5fb0
--- /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 0000000..942f337
--- /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
-- 
GitLab