core/Dockerfile

26 lines
628 B
Docker
Raw Normal View History

2024-02-19 06:56:23 +00:00
FROM python:alpine
2024-02-25 15:36:08 +00:00
# Update package lists and install necessary dependencies
RUN apk update && \
apk add --no-cache build-base icu-data-full curl python3-dev musl-dev postgresql-dev postgresql-client && \
curl -sSL https://install.python-poetry.org | python
# Set working directory
2023-10-06 00:22:37 +00:00
WORKDIR /app
2023-10-23 14:47:11 +00:00
2024-02-25 15:36:08 +00:00
# Copy just the dependency manifests first
COPY poetry.lock pyproject.toml /app/
# Install dependencies
RUN poetry config virtualenvs.create false && \
poetry install --no-dev
# Copy the rest of the application
COPY . /app
2024-02-17 10:21:52 +00:00
2024-02-25 15:36:08 +00:00
# Expose the port
EXPOSE 8000
2024-02-25 15:36:08 +00:00
# Command to run the application
2024-02-17 10:21:52 +00:00
CMD ["python", "server.py"]