-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update osmcha wbe contianer and helm templates
- Loading branch information
Rub21
committed
Dec 23, 2023
1 parent
700b451
commit 977e9d1
Showing
4 changed files
with
35 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,12 @@ | ||
FROM node:16-slim as builder | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
ARG BUILD_ENV=prod | ||
|
||
## Necesary env values to deploy | ||
ENV OSMCHA_URL=https://osmcha-staging.openhistoricalmap.org | ||
ENV OSMCHA_API_URL=www.openhistoricalmap.org | ||
ENV REACT_APP_OSM_URL=https://www.openhistoricalmap.org | ||
ENV REACT_APP_OSM_API=https://www.openhistoricalmap.org/api/0.6 | ||
ENV REACT_APP_OVERPASS_BASE=//overpass-api.openhistoricalmap.org/api/interpreter | ||
|
||
ENV BUILD_ENV=prod | ||
ENV REACT_APP_PRODUCTION_API_URL=/api/v1 | ||
RUN apt-get update && apt-get install -y git | ||
RUN mkdir /app | ||
WORKDIR /app | ||
RUN git clone https://github.com/sunu/osmcha-frontend.git /app | ||
RUN find /app -type f -exec sed -i 's/www.openstreetmap.org/www.openhistoricalmap.org/g' {} + | ||
RUN git clone https://github.com/Rub21/osmcha-frontend.git /app | ||
RUN git checkout env/realchangesets | ||
RUN yarn install | ||
ENV REACT_APP_PRODUCTION_API_URL /api/v1 | ||
RUN sed -i "s|https://osmcha.org|$OSMCHA_URL|g" package.json | ||
RUN yarn build:${BUILD_ENV} | ||
|
||
FROM nginx:alpine | ||
COPY --from=builder /app/build /assets | ||
COPY start.sh . | ||
CMD [ "/app/start.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/usr/bin/env bash | ||
set -x | ||
export BUILD_ENV=prod | ||
export REACT_APP_PRODUCTION_API_URL=/api/v1 | ||
sed -i "s|https://osmcha.org|$OSMCHA_URL|g" package.json | ||
yarn build:${BUILD_ENV} | ||
find /app/build -type f -exec sed -i "s/www.openstreetmap.org/$OSMCHA_API_URL/g" {} + | ||
cp -r /app/build/* /assets/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters