36 lines
781 B
Docker
36 lines
781 B
Docker
FROM python:3.11-slim
|
|
|
|
# Set working directory
|
|
WORKDIR /app
|
|
|
|
# Install dependencies
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
# Copy application files
|
|
COPY app.py .
|
|
COPY malias_wrapper.py .
|
|
COPY malias.py .
|
|
COPY reset_password.py .
|
|
COPY templates/ templates/
|
|
COPY static/ static/
|
|
|
|
# Create data and session directories
|
|
RUN mkdir -p /app/data /app/data/flask_sessions && \
|
|
chmod 777 /app/data/flask_sessions
|
|
|
|
# Copy entrypoint script and make scripts executable
|
|
COPY docker-entrypoint.sh .
|
|
RUN chmod +x docker-entrypoint.sh reset_password.py
|
|
|
|
# Expose port
|
|
EXPOSE 5172
|
|
|
|
# Set environment variables
|
|
ENV PYTHONUNBUFFERED=1
|
|
ENV FLASK_DEBUG=False
|
|
ENV FLASK_ENV=production
|
|
|
|
# Run the application via entrypoint
|
|
ENTRYPOINT ["./docker-entrypoint.sh"]
|