Skip to content

Commit

Permalink
update docker
Browse files Browse the repository at this point in the history
  • Loading branch information
vietnguyengit committed Dec 11, 2024
1 parent 5910fa0 commit afc6cf6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
16 changes: 9 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
# Use the official Python base image
# Build stage
FROM python:3.10-slim

# Set the working directory in the container
WORKDIR /app

# Copy the pyproject.toml and poetry.lock files into the container
# Copy only necessary files for dependency installation
COPY pyproject.toml poetry.lock ./

# Install system dependencies and Python dependencies
# Install system dependencies and Poetry
RUN apt update && \
apt -y upgrade && \
apt -y install --no-install-recommends curl build-essential && \
pip3 install --upgrade pip && \
pip3 install poetry && \
poetry config virtualenvs.create false && \
poetry lock && \
poetry install
poetry install && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Copy the rest of the application code into the container
# Copy the rest of the application code
COPY . /app

# Make sure log config file (if provided) is available in the working directory
Expand All @@ -25,7 +27,7 @@ COPY log_config.yaml /app/log_config.yaml
# Expose the port the app runs on
EXPOSE 8000

# Set environment variables from a .env file or directly
# Set environment variables
ENV GUNICORN_TIMEOUT=3600
ENV GUNICORN_WORKERS_NUM=4

Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "data-discovery-ai"
version = "0.1.0"
description = ""
authors = ["Viet Nguyen <[email protected]>"]
readme = "README.md"

[tool.poetry.dependencies]
python = "~3.10"
Expand Down

0 comments on commit afc6cf6

Please sign in to comment.