feat: Add container startup script for backend that conditionally manages OpenClaw gateway and starts the Uvicorn server.
This commit is contained in:
+5
-1
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user