zai / Dockerfile
sanbo110's picture
update sth at 2025-10-23 17:38:54
fdc7f56
raw
history blame contribute delete
609 Bytes
FROM python:3.12-slim
# Set working directory
WORKDIR /app
# Create data and logs directories with proper permissions
RUN mkdir -p /app/data /app/logs && \
chmod 755 /app/data /app/logs
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Set environment variable for database path
ENV DB_PATH=/app/data/tokens.db
ENV SKIP_AUTH_TOKEN=true
ENV ANONYMOUS_MODE=true
# 服务监听端口
ENV LISTEN_PORT=7860
# 调试日志
ENV DEBUG_LOGGING=true
# Expose port
EXPOSE 7860
# Run the application
CMD ["python", "main.py"]