diff --git a/DockerfileCombined b/DockerfileCombined new file mode 100644 index 00000000..3759e283 --- /dev/null +++ b/DockerfileCombined @@ -0,0 +1,33 @@ +# Use a multi-stage build to build both frontend and backend + +# Stage 1: Build frontend +FROM node:lts AS frontend-builder +RUN apt-get update && apt-get install -y openssh-client +RUN mkdir -p -m 0600 ~/.ssh && ssh-keyscan github.com >> ~/.ssh/known_hosts +WORKDIR /app +#ARG GITHUB_TOKEN +RUN #git clone https://${GITHUB_TOKEN}@github.com/Embucket/embucket.git . +RUN --mount=type=ssh git clone git@github.com:Embucket/embucket.git . +RUN npm install -g pnpm +RUN pnpm install + +# Stage 2: Build backend +FROM rust:latest AS builder +RUN update-ca-certificates +WORKDIR /app +COPY ./ . +COPY rest-catalog-open-api.yaml rest-catalog-open-api.yaml +RUN cargo build --release + +# Stage 3: Final image +FROM debian:bookworm-slim +WORKDIR /app +RUN apt-get update && apt-get install -y openssl nodejs npm && rm -rf /var/lib/apt/lists/* +RUN npm install -g pnpm serve + +COPY --from=builder /app/target/release/bucketd ./ +COPY --from=builder /app/rest-catalog-open-api.yaml rest-catalog-open-api.yaml +COPY --from=frontend-builder /app ./frontend + +# Command to start both frontend and backend +CMD ["sh", "-c", "./bucketd & cd ./frontend && pnpm i && pnpm codegen && pnpm dev"] \ No newline at end of file diff --git a/crates/nexus/src/http/ui/handlers/query.rs b/crates/nexus/src/http/ui/handlers/query.rs index daa0f981..d147fae7 100644 --- a/crates/nexus/src/http/ui/handlers/query.rs +++ b/crates/nexus/src/http/ui/handlers/query.rs @@ -28,7 +28,7 @@ pub struct ApiDoc; post, path = "/ui/query", request_body = QueryPayload, - operation_id = "query", + operation_id = "runQuery", tags = ["query"], responses( (status = 200, description = "Returns result of the query", body = QueryResponse),