Show openapi docs in release mode

This commit is contained in:
Martin Berg Alstad
2024-06-16 12:54:53 +02:00
parent 4d953178e3
commit 5dc4a8e429
3 changed files with 18 additions and 6 deletions

View File

@ -19,10 +19,21 @@ COPY ./src ./src
RUN rm ./target/release/deps/simplify_truths*
RUN cargo build --release
FROM node:20.14.0 as spec
WORKDIR /spec
COPY ./spec .
RUN npm install
RUN USER=root npm install -g @typespec/compiler && npm install -g @redocly/cli
RUN npm run tsp-compile && npm run redoc-build
FROM debian
# copy the build artifact from the build stage
COPY --from=build /simplify_truths/target/release/simplify_truths .
# copy the generated html file for REDOC documentation
COPY --from=spec /spec/dist/index.html ./openapi/index.html
EXPOSE 8000