Fixed login with only ip:port access

This commit is contained in:
2026-01-23 13:07:13 +01:00
parent 76ad905aab
commit 459d3b83ee
4 changed files with 188 additions and 569 deletions

View File

@@ -1,34 +1,22 @@
FROM python:3.11-slim
FROM python:3-alpine
# Set working directory
WORKDIR /app
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
RUN pip install --no-cache-dir flask requests werkzeug
# 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 directory
RUN mkdir -p /app/data
# Copy entrypoint script and make scripts executable
COPY docker-entrypoint.sh .
RUN chmod +x docker-entrypoint.sh reset_password.py
# Expose port
EXPOSE 5172
# Copy files
COPY . /app/
# Set environment variables
ENV PYTHONUNBUFFERED=1
ENV FLASK_DEBUG=False
ENV FLASK_ENV=production
ENV FLASK_PORT=5142 \
FLASK_HOST=0.0.0.0 \
FLASK_ENV=production \
FLASK_DEBUG=False \
ENABLE_PROXY=false
# Run the application via entrypoint
ENTRYPOINT ["./docker-entrypoint.sh"]
# Expose port
EXPOSE 5142
# Run the application
CMD ["python", "app.py"]