Skip to content

Commit

Permalink
fix swagger-ui
Browse files Browse the repository at this point in the history
  • Loading branch information
archeoss committed Sep 4, 2023
1 parent d76018a commit aa7e919
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ chrono = { version = "0.4", features = ["serde"] }

# OpenAPI + Swagger
utoipa = { version = "3.4", features = ["axum_extras", "chrono", "openapi_extensions"] }
utoipa-swagger-ui = { version = "3.1", features = ["axum"] }
utoipa-swagger-ui = { version = "3.1", features = ["debug-embed", "axum"] }
utoipa-redoc = { version = "0.1", features = ["axum"] }
utoipa-rapidoc = { version = "0.1", features = ["axum"] }

Expand Down
2 changes: 1 addition & 1 deletion backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ hyper = "0.14"

# OpenAPI + Swagger
utoipa = { version = "3.4", features = ["yaml", "axum_extras", "chrono", "openapi_extensions"] }
utoipa-swagger-ui = { version = "3.1", features = ["axum"] }
utoipa-swagger-ui = { version = "3.1", features = ["debug-embed", "axum"] }
utoipa-redoc = { version = "0.1", features = ["axum"] }
utoipa-rapidoc = { version = "0.1", features = ["axum"] }

Expand Down
7 changes: 0 additions & 7 deletions dockerfiles/alpine/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ RUN apt-get update \
&& rustup target add $BUILD_TARGET


# RUN USER=root cargo new --bin bob-management
COPY ./Cargo.toml ./Cargo.toml
COPY ./build.rs ./build.rs
COPY ./cli ./cli
Expand All @@ -48,11 +47,6 @@ RUN --mount=type=cache,target=/usr/local/cargo/registry \
&& mkdir /build_output/backend \
&& mkdir /build_output/frontend \
&& cp -f target/$BUILD_TARGET/debug/bob_management /build_output/backend/bob_management \
# FIXME: Swagger-Ui doesn't work in docker for some reason - RapiDoc and Redoc are OK
# && mkdir /build_output/target/ \
# && mkdir /build_output/target/debug \
# && find target/$BUILD_TARGET/debug/build -maxdepth 1 -name "utoipa-swagger-ui*" \
# && mv -v $(find target/$BUILD_TARGET/debug/build -maxdepth 1 -name "utoipa-swagger-ui*") /build_output/build \
&& cp -r -f target/frontend/dist /build_output/frontend/dist

FROM alpine:3.18
Expand All @@ -70,7 +64,6 @@ EXPOSE 9000

COPY --from=builder --chown=$APP_USER:$APP_USER /build_output/backend ${APP}/backend
COPY --from=builder --chown=$APP_USER:$APP_USER /build_output/frontend ${APP}/frontend
# COPY --from=builder --chown=$APP_USER:$APP_USER /build_output/build ${APP}/build

USER $APP_USER
WORKDIR ${APP}
Expand Down

0 comments on commit aa7e919

Please sign in to comment.