feat: Add container startup script for backend that conditionally manages OpenClaw gateway and starts the Uvicorn server.

This commit is contained in:
2026-03-13 13:46:29 -04:00
parent deadc684c7
commit a466e64247
4 changed files with 65 additions and 1 deletions
+5 -1
View File
@@ -62,6 +62,10 @@ COPY --chown=foxy:foxy --from=frontend-build /build/dist ./static
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD curl -f http://localhost:7000/api/health || exit 1
# Copy and prepare startup script
COPY --chown=foxy:foxy backend/start-container.sh ./
RUN chmod +x ./start-container.sh
# Runtime config
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
@@ -71,4 +75,4 @@ EXPOSE 7000
USER foxy
CMD ["python", "-m", "uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7000"]
CMD ["./start-container.sh"]