diff --git a/connector-superoffice/Dockerfile b/connector-superoffice/Dockerfile index 3301cb85..9097eff2 100644 --- a/connector-superoffice/Dockerfile +++ b/connector-superoffice/Dockerfile @@ -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"] diff --git a/connector-superoffice/start.sh b/connector-superoffice/start.sh deleted file mode 100644 index dc7fa850..00000000 --- a/connector-superoffice/start.sh +++ /dev/null @@ -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