mirror of
https://github.com/Kizuren/uLinkShortener.git
synced 2025-12-21 21:16:17 +01:00
20 lines
353 B
Docker
20 lines
353 B
Docker
FROM python:3.11-slim
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy requirements first to leverage Docker cache
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy application code
|
|
COPY . .
|
|
|
|
# Set environment variables
|
|
ENV FLASK_APP=server.py
|
|
ENV FLASK_ENV=production
|
|
|
|
# Expose port
|
|
EXPOSE 5000
|
|
|
|
# Run the application
|
|
CMD ["python", "server.py"]
|