-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix/ci: build with environment specific API URI value (#4)
- Loading branch information
1 parent
518585b
commit 325285d
Showing
7 changed files
with
44 additions
and
4 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
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,9 +1,17 @@ | ||
FROM nginx:1.27.0-alpine | ||
|
||
ARG HTTP_PROXY | ||
ARG HTTPS_PROXY | ||
|
||
ENV HTTP_PROXY=$HTTP_PROXY | ||
ENV HTTPS_PROXY=$HTTPS_PROXY | ||
|
||
COPY dist/moki/browser /usr/share/nginx/html/moki | ||
COPY nginx /opt | ||
RUN rm /etc/nginx/conf.d/default.conf | ||
|
||
COPY ./nginx.conf /etc/nginx/conf.d/default.conf | ||
RUN apk add --no-cache bash | ||
|
||
EXPOSE 80 | ||
|
||
CMD ["nginx-debug", "-g", "daemon off;"] | ||
CMD /bin/bash -c "bash /opt/inject-env.sh /opt/nginx.conf /etc/nginx/conf.d/nginx.conf && exec nginx -g 'daemon off;'" |
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
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,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
NGINX_TEMPLATE_FILE=$1 | ||
NGINX_OUTPUT_FILE=$2 | ||
|
||
if [[ ! -f ${NGINX_TEMPLATE_FILE} ]] | ||
then | ||
echo "ERROR: Parameter 1 nginx.conf file ('$NGINX_TEMPLATE_FILE') does not exist." | ||
exit 1 | ||
fi | ||
|
||
|
||
sed -e s~%API_HOST_URL%~"${API_HOST_URL}"~g \ | ||
"${NGINX_TEMPLATE_FILE}" > "${NGINX_OUTPUT_FILE}" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
{ | ||
"/papi": { | ||
"target": "http://localhost:8087", | ||
"target": "http://localhost:8087/papi", | ||
"secure": false, | ||
"logLevel": "debug", | ||
"changeOrigin": true | ||
"changeOrigin": true, | ||
"pathRewrite": { | ||
"^/papi": "" | ||
} | ||
} | ||
} |