release commit
This commit is contained in:
36
Dockerfile
Normal file
36
Dockerfile
Normal file
@ -0,0 +1,36 @@
|
||||
FROM python:3.9-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy requirements file if you have one
|
||||
COPY requirements.txt .
|
||||
|
||||
RUN pip install --upgrade packaging
|
||||
RUN pip install -r requirements.txt
|
||||
# Install poetry
|
||||
RUN pip install --no-cache-dir "poetry<2.0.0"
|
||||
|
||||
|
||||
# Copy .env file
|
||||
COPY .env ./
|
||||
|
||||
|
||||
# Copy only pyproject.toml and poetry.lock (if exists) first
|
||||
COPY pyproject.toml ./
|
||||
COPY poetry.lock* ./
|
||||
|
||||
# Configure poetry to not create a virtual environment inside the container
|
||||
RUN poetry config virtualenvs.create false
|
||||
|
||||
# Install dependencies
|
||||
RUN poetry install --no-dev --no-interaction --no-ansi
|
||||
|
||||
# Copy your project files
|
||||
COPY . .
|
||||
|
||||
# Make the entrypoint script executable
|
||||
COPY entrypoint.sh .
|
||||
RUN chmod +x entrypoint.sh
|
||||
|
||||
RUN sed -i 's/\r$//' /app/entrypoint.sh
|
||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
Reference in New Issue
Block a user