Blue Green
Some checks failed
Build, Push, and Blue/Green Deploy to Nomad / docker-nomad (push) Failing after 6s

This commit is contained in:
Henrik Jess
2024-12-20 10:37:56 +01:00
parent 1b047a74fd
commit 23a22fb4d6

View File

@@ -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"]
# 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"]