From 977b2a9ad2d0bdc8f9f89e33b64798eaae7055d8 Mon Sep 17 00:00:00 2001 From: Leopere Date: Thu, 13 Mar 2025 10:08:47 -0400 Subject: [PATCH] Temporarily disable healthchecks and update Dockerfile.production --- docker/midtownplaydio/Dockerfile | 6 ++-- docker/midtownplaydio/Dockerfile.production | 35 +-------------------- 2 files changed, 4 insertions(+), 37 deletions(-) diff --git a/docker/midtownplaydio/Dockerfile b/docker/midtownplaydio/Dockerfile index 60b07f3..c061f75 100644 --- a/docker/midtownplaydio/Dockerfile +++ b/docker/midtownplaydio/Dockerfile @@ -29,9 +29,9 @@ 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 +# Health check - temporarily disabled +# HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \ +# CMD curl -f http://localhost:3000/health || exit 1 # Start with uvicorn for hot reloading CMD uvicorn app:app --host 0.0.0.0 --port 3000 --reload \ No newline at end of file diff --git a/docker/midtownplaydio/Dockerfile.production b/docker/midtownplaydio/Dockerfile.production index fef10c3..9a0447e 100644 --- a/docker/midtownplaydio/Dockerfile.production +++ b/docker/midtownplaydio/Dockerfile.production @@ -1,34 +1 @@ -FROM python:3.11-slim - -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 \ No newline at end of file +FROM git.nixc.us/colin/midtownplaydio:staging