SGO/Dockerfile
Eduardo Figueroa 6886c8871c
Initial Commit
2025-11-20 12:03:30 -08:00

39 lines
768 B
Docker

FROM python:3.11-slim
# Install gosu for user switching
RUN apt-get update && \
apt-get install -y --no-install-recommends gosu && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Install Python dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application files
COPY . .
# Create default directories
RUN mkdir -p /app/data /home/sgo
# Copy entrypoint script
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Expose port
EXPOSE 5000
# Set environment variables
ENV FLASK_APP=app.py \
PYTHONUNBUFFERED=1 \
PUID=1000 \
PGID=1000 \
DEBUG=false \
HOME=/home/sgo
# Use entrypoint for PUID/PGID handling
ENTRYPOINT ["/entrypoint.sh"]
# Run the application
CMD ["python", "app.py"]