From 0f5715f8f16c7448138b1e1e2137ea6f618aa883 Mon Sep 17 00:00:00 2001 From: Gerardbulky Date: Sun, 11 Feb 2024 22:32:21 +0100 Subject: [PATCH 1/2] Working from test branch --- Dockerfile | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..e69de29 From f8c97a1594c99f4ec20aab10212229042d3b5337 Mon Sep 17 00:00:00 2001 From: Gerardbulky Date: Tue, 13 Feb 2024 13:30:08 +0100 Subject: [PATCH 2/2] Added dockerfile and dockercompose.yaml file --- .dockerignore | 34 ++++++++++++++++++++++++++++++++++ Dockerfile | 32 ++++++++++++++++++++++++++++++++ compose.yaml | 8 ++++++++ 3 files changed, 74 insertions(+) create mode 100644 .dockerignore create mode 100644 compose.yaml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..3edb0b5 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,34 @@ +# Include any files or directories that you don't want to be copied to your +# container here (e.g., local build artifacts, temporary files, etc.). +# +# For more help, visit the .dockerignore file reference guide at +# https://docs.docker.com/engine/reference/builder/#dockerignore-file + +**/.DS_Store +**/__pycache__ +**/.venv +**/.classpath +**/.dockerignore +**/.env +**/.git +**/.gitignore +**/.project +**/.settings +**/.toolstarget +**/.vs +**/.vscode +**/*.*proj.user +**/*.dbmdl +**/*.jfm +**/bin +**/charts +**/docker-compose* +**/compose* +**/Dockerfile* +**/node_modules +**/npm-debug.log +**/obj +**/secrets.dev.yaml +**/values.dev.yaml +LICENSE +README.md diff --git a/Dockerfile b/Dockerfile index e69de29..0ca47a2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -0,0 +1,32 @@ +ARG PYTHON_VERSION=3.10.11 +FROM python:${PYTHON_VERSION}-slim as base + +# Prevents Python from writing pyc files. +ENV PYTHONDONTWRITEBYTECODE=1 + +# Keeps Python from buffering stdout and stderr to avoid situations where +# the application crashes without emitting any logs due to buffering. +ENV PYTHONUNBUFFERED=1 + +WORKDIR /app + +RUN pip install --no-cache-dir -r requirement.txt + +# Copy the source code into the container. +COPY chroma_storage /app/chroma_storage + +COPY file /app/file + +COPY src /app/src + +COPY licence /app/licence + +COPY requirement.txt /app/requirement.txt + +COPY start_everything_bash /app/start_everything_bash + +# Expose the port that the application listens on. +EXPOSE 5000 + +# Run the application. +CMD python3 src/server_mail.py diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..f7f23b8 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,8 @@ + +services: + server: + build: + context: . + ports: + - 5000:5000 +