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 new file mode 100644 index 0000000..0ca47a2 --- /dev/null +++ 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 +