1
0
Fork 0
mirror of https://github.com/seanmorley15/AdventureLog.git synced 2025-07-24 07:19:36 +02:00
AdventureLog/backend/Dockerfile
2024-07-09 09:58:52 -04:00

32 lines
No EOL
714 B
Docker

# Dockerfile
FROM python:3.10-slim
LABEL Developers="Sean Morley"
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Set the working directory
WORKDIR /code
# Install system dependencies
RUN apt-get update \
&& apt-get install -y git postgresql-client \
&& apt-get clean
# Install Python dependencies
COPY ./server/requirements.txt /code/
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
# Copy the Django project code into the Docker image
COPY ./server /code/
RUN python3 manage.py collectstatic --verbosity 2
# Set the entrypoint script
COPY ./entrypoint.sh /code/entrypoint.sh
RUN chmod +x /code/entrypoint.sh
ENTRYPOINT ["/code/entrypoint.sh"]