Skip to content

Commit 9b77d84

Browse files
Fix static paths
commit-id:e7b4fb4e
1 parent 42f91f9 commit 9b77d84

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ FROM dev as dev-local
9898
RUN mkdir -p /opt/cache && \
9999
chmod 777 /opt/cache
100100

101+
RUN mkdir -p /josh/static && \
102+
chmod 777 /josh/static
103+
101104
VOLUME /opt/cache
102105

103106
ENV CARGO_TARGET_DIR=/opt/cache/cargo-target
@@ -130,6 +133,9 @@ ENV CARGO_TARGET_DIR=/opt/cargo-target
130133

131134
FROM dev-cache as dev-ci
132135

136+
RUN mkdir -p /josh/static && \
137+
chmod 777 /josh/static
138+
133139
RUN cargo chef cook --workspace --recipe-path recipe.json
134140

135141
RUN mkdir -p josh-ui

josh-proxy/src/bin/josh-proxy.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ async fn handle_ui_request(
427427
resource_path
428428
};
429429

430-
let result = hyper_staticfile::resolve_path("static", resolve_path).await?;
430+
let result = hyper_staticfile::resolve_path("/josh/static", resolve_path).await?;
431431
let response = hyper_staticfile::ResponseBuilder::new()
432432
.request(&req)
433433
.build(result)?;

tests/proxy/setup_test_env.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ GIT_DIR="${TESTTMP}/remote/" GIT_PROJECT_ROOT="${TESTTMP}/remote/" GIT_HTTP_EXPO
3131
echo $! > "${TESTTMP}/server_pid"
3232

3333
# Copy static UI resources
34-
cp -R "${TESTDIR}/../../static/" static
34+
cp -R "${TESTDIR}/../../static/" /josh/
3535

3636
if [ -n "${CARGO_TARGET_DIR+x}" ]; then
3737
export TARGET_DIR=${CARGO_TARGET_DIR}

0 commit comments

Comments
 (0)