Skip to content

Commit

Permalink
Added dockerfile and dockercompose.yaml file
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerardbulky committed Feb 13, 2024
1 parent 0f5715f commit f8c97a1
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -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
32 changes: 32 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

services:
server:
build:
context: .
ports:
- 5000:5000

0 comments on commit f8c97a1

Please sign in to comment.