Files
core/Dockerfile

26 lines
628 B
Docker
Raw Normal View History

2024-02-19 09:56:23 +03:00
FROM python:alpine
2024-02-25 18:36:08 +03: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 03:22:37 +03:00
WORKDIR /app
2023-10-23 17:47:11 +03:00
2024-02-25 18:36:08 +03:00
# Install dependencies
RUN poetry config virtualenvs.create false && \
poetry install --no-dev
2024-02-25 19:08:20 +03:00
# Copy just the dependency manifests first
COPY poetry.lock pyproject.toml /app/
2024-02-25 18:36:08 +03:00
# Copy the rest of the application
COPY . /app
2024-02-17 13:21:52 +03:00
2024-02-25 18:36:08 +03:00
# Expose the port
EXPOSE 8000
2024-02-25 18:36:08 +03:00
# Command to run the application
2024-02-17 13:21:52 +03:00
CMD ["python", "server.py"]