From 23a22fb4d6ca5237f838703f951b2ca31cb58e76 Mon Sep 17 00:00:00 2001 From: Henrik Jess Date: Fri, 20 Dec 2024 10:37:56 +0100 Subject: [PATCH] Blue Green --- Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6e7a4b0..93aac96 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,8 +13,8 @@ RUN pip install --no-cache-dir -r requirements.txt # Copy the rest of the application code COPY . . -# Expose the port the FastAPI app runs on (default Uvicorn port) -EXPOSE 9212 +# Expose the default port (optional, primarily for documentation purposes) +EXPOSE 9210 -# Command to run the FastAPI application -CMD ["uvicorn", "app.main:app", "--proxy-headers", "--host", "0.0.0.0", "--port", "9212", "--workers", "1"] \ No newline at end of file +# Command to run the FastAPI application dynamically using the PORT environment variable +CMD ["sh", "-c", "uvicorn app.main:app --proxy-headers --host 0.0.0.0 --port ${PORT:-9210} --workers 1"] \ No newline at end of file