fix: [30388f42] Connector: CMD Fix (uvicorn & Worker)

- Integriert den Start von  (Hintergrund) und  (Vordergrund) direkt in den  Befehl des Dockerfiles.
- Eliminiert die  Fehler.
- Entfernt das überflüssige  Skript.
This commit is contained in:
2026-03-06 19:02:35 +00:00
parent 5f8878cffe
commit 8e20adae93
2 changed files with 9 additions and 15 deletions

View File

@@ -22,13 +22,13 @@ COPY --from=builder /root/.local /root/.local
# Update PATH to include the user-installed packages
ENV PATH=/root/.local/bin:$PATH
# Copy source code (explicitly place needed files in /app root)
COPY worker.py .
COPY webhook_app.py .
COPY queue_manager.py .
COPY config.py .
COPY superoffice_client.py .
COPY start.sh .
# Copy source code explicitly from their locations relative to the build context (which will be the project root)
COPY connector-superoffice/worker.py .
COPY connector-superoffice/webhook_app.py .
COPY connector-superoffice/queue_manager.py .
COPY connector-superoffice/config.py .
COPY connector-superoffice/superoffice_client.py .
COPY connector-superoffice/start.sh .
# Expose port for Webhook
EXPOSE 8000
@@ -36,5 +36,5 @@ EXPOSE 8000
# Make sure scripts are executable
RUN chmod +x start.sh
# Start both worker and webhook
CMD ["./start.sh"]
# Start both worker and webhook directly within the CMD
CMD ["/bin/bash", "-c", "python3 worker.py & uvicorn webhook_app:app --host 0.0.0.0 --port 8000"]

View File

@@ -1,6 +0,0 @@
#!/bin/bash
# Start Worker in background
python worker.py &
# Start Webhook Server in foreground
uvicorn webhook_app:app --host 0.0.0.0 --port 8000