Skip to content

Commit 7d5f56c

Browse files
committed
Fixed 404 on subpaths.
1 parent 455c916 commit 7d5f56c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ FROM node:slim
55
ARG APP_TITLE="STAC Manager"
66
ARG APP_DESCRIPTION="A web application for managing STAC catalogs"
77
ARG REACT_APP_STAC_API="https://earth-search.aws.element84.com/v0"
8+
ARG PUBLIC_URL="http://127.0.0.1:8080"
89

910
ENV APP_TITLE=${APP_TITLE}
1011
ENV APP_DESCRIPTION=${APP_DESCRIPTION}
1112
ENV REACT_APP_STAC_API=${REACT_APP_STAC_API}
12-
ENV PUBLIC_URL="http://127.0.0.1:8080"
13+
ENV PUBLIC_URL=${PUBLIC_URL}
1314

1415
# Set the working directory
1516
WORKDIR /app
@@ -25,6 +26,7 @@ RUN npm i -g http-server
2526
# Create a start script that respects runtime environment variables
2627
RUN echo '#!/bin/sh\n\
2728
npm run all:build\n\
29+
cp packages/client/dist/index.html packages/client/dist/404.html\n\
2830
http-server -p 80 packages/client/dist' > /app/start.sh
2931

3032
RUN chmod +x /app/start.sh

0 commit comments

Comments
 (0)