alternative-backend-service/dockerfile
saani 36b5bb14b3 chore(docker): change application port from 8000 to 8080
Update Dockerfile to expose and bind Gunicorn to port 8080 instead of 8000. This aligns the container port configuration with the expected deployment environment requirements.

Changes:
- Update EXPOSE directive to port 8080
- Update Gunicorn bind address to 0.0.0.0:8080
2025-11-23 14:02:30 +00:00

30 lines
701 B
Plaintext

FROM python:3.11-slim
# Set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# Set work directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
gcc \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements and install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip
RUN pip install --no-cache-dir -r requirements.txt
# Copy project
COPY . .
# Collect static files
RUN python manage.py collectstatic --noinput
# Expose port
EXPOSE 8080
# Run migrations and start Gunicorn
CMD sh -c "python manage.py migrate && gunicorn booking_system.wsgi:application --bind 0.0.0.0:8080 --workers 3"