Show openapi docs in release mode
This commit is contained in:
11
Dockerfile
11
Dockerfile
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user