File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -4,13 +4,12 @@ FROM node:slim
44# Define default values for environment variables
55ARG APP_TITLE="STAC Manager"
66ARG APP_DESCRIPTION="A web application for managing STAC catalogs"
7- ARG REACT_APP_STAC_API=http://localhost:80
8- ARG PUBLIC_URL=/
7+ ARG REACT_APP_STAC_API="https://earth-search.aws.element84.com/v0"
98
109ENV APP_TITLE=${APP_TITLE}
1110ENV APP_DESCRIPTION=${APP_DESCRIPTION}
1211ENV REACT_APP_STAC_API=${REACT_APP_STAC_API}
13- ENV PUBLIC_URL=${PUBLIC_URL}
12+ ENV PUBLIC_URL="http://127.0.0.1:8080"
1413
1514# Set the working directory
1615WORKDIR /app
@@ -22,8 +21,14 @@ COPY . .
2221RUN npm i
2322RUN npm i -g http-server
2423
25- RUN npm run all:build
24+
25+ # Create a start script that respects runtime environment variables
26+ RUN echo '#!/bin/sh\n \
27+ npm run all:build\n \
28+ http-server -p 80 packages/client/dist' > /app/start.sh
29+
30+ RUN chmod +x /app/start.sh
2631
2732EXPOSE 80
2833
29- ENTRYPOINT ["http-server" , "-p" , "80" , "packages/client/dist " ]
34+ ENTRYPOINT ["/app/start.sh " ]
You can’t perform that action at this time.
0 commit comments