Temporarily disable healthchecks and update Dockerfile.production
ci/woodpecker/push/woodpecker Pipeline was successful
Details
ci/woodpecker/push/woodpecker Pipeline was successful
Details
This commit is contained in:
parent
1f583ba7c5
commit
977b2a9ad2
|
@ -29,9 +29,9 @@ USER appuser
|
||||||
# Expose the port the app runs on
|
# Expose the port the app runs on
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
# Health check
|
# Health check - temporarily disabled
|
||||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
|
# HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
|
||||||
CMD curl -f http://localhost:3000/health || exit 1
|
# CMD curl -f http://localhost:3000/health || exit 1
|
||||||
|
|
||||||
# Start with uvicorn for hot reloading
|
# Start with uvicorn for hot reloading
|
||||||
CMD uvicorn app:app --host 0.0.0.0 --port 3000 --reload
|
CMD uvicorn app:app --host 0.0.0.0 --port 3000 --reload
|
|
@ -1,34 +1 @@
|
||||||
FROM python:3.11-slim
|
FROM git.nixc.us/colin/midtownplaydio:staging
|
||||||
|
|
||||||
WORKDIR /app
|
|
||||||
|
|
||||||
# Install curl for healthcheck and other dependencies
|
|
||||||
RUN apt-get update && \
|
|
||||||
apt-get install -y --no-install-recommends curl && \
|
|
||||||
apt-get clean && \
|
|
||||||
rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
# Copy requirements first for better caching
|
|
||||||
COPY src/requirements.txt .
|
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
|
||||||
|
|
||||||
# Copy the rest of the application
|
|
||||||
COPY src/ .
|
|
||||||
|
|
||||||
# Create directory for static files
|
|
||||||
RUN mkdir -p /app/static && chmod 777 /app/static
|
|
||||||
|
|
||||||
# Create non-root user for security
|
|
||||||
RUN adduser --disabled-password --gecos '' appuser
|
|
||||||
RUN chown -R appuser:appuser /app
|
|
||||||
USER appuser
|
|
||||||
|
|
||||||
# Expose the port the app runs on
|
|
||||||
EXPOSE 3000
|
|
||||||
|
|
||||||
# Health check
|
|
||||||
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
|
|
||||||
CMD curl -f http://localhost:3000/health || exit 1
|
|
||||||
|
|
||||||
# Run the application with Gunicorn
|
|
||||||
CMD gunicorn -w 4 -k uvicorn.workers.UvicornWorker -b 0.0.0.0:3000 app:app
|
|
||||||
|
|
Loading…
Reference in New Issue