instalinks/Dockerfile.app
oleg.vodyanov91@gmail.com 4a84cf25b2 dockerfiles_optimization
2025-04-13 22:54:16 +04:00

31 lines
734 B
Erlang

# Dockerfile
FROM python:3.12.9-slim-bookworm
# Create a working directory for the app
WORKDIR /app
# Copy requirements first, to leverage Docker's layer caching
COPY instalinks/instalinks/requirements.txt /app/
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt && \
apt update && apt install -y nginx uwsgi which gcc
# Copy the rest of the source code
COPY instalinks/ /app/
COPY static /app/static
COPY nginx/etc/nginx/ /etc/nginx/
COPY running.sh /app/
COPY manage.py /app/
# Set environment variables for Django
ENV PYTHONUNBUFFERED 1
ENV DJANGO_SETTINGS_MODULE settings
# Expose the port Django runs on
# EXPOSE 8000
EXPOSE 8080
# Default command: run the Django dev server
CMD /app/running.sh