-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rolling back to dev and SPIRE health check time automation (#206)
* rolled back to dev mode and spirehealth check time automation Signed-off-by: Mohammed Abdi <[email protected]> * update documentation Signed-off-by: Mohammed Abdi <[email protected]> --------- Signed-off-by: Mohammed Abdi <[email protected]>
- Loading branch information
Showing
15 changed files
with
396 additions
and
850 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,48 +1,19 @@ | ||
# Build stage | ||
FROM node:16-alpine3.14 AS build | ||
FROM node:16-alpine | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY tornjak-frontend . | ||
|
||
RUN npm install --omit=dev && \ | ||
npm run build | ||
RUN npm install --omit=dev | ||
|
||
# Runtime stage | ||
FROM node:16-alpine3.14 AS runtime | ||
|
||
WORKDIR /usr/src/app | ||
|
||
COPY --from=build /usr/src/app/build . | ||
COPY --from=build /usr/src/app/.env.prod . | ||
|
||
# install serve package | ||
RUN npm install -g serve | ||
RUN npm prune --production | ||
|
||
# set env variables | ||
ARG REACT_APP_API_SERVER_URI | ||
ARG REACT_APP_AUTH_SERVER_URI | ||
ARG REACT_APP_SPIRE_HEALTH_CHECK_ENABLE | ||
ARG REACT_APP_SPIRE_HEALTH_CHECK_FREQ_SEC | ||
|
||
ENV REACT_APP_API_SERVER_URI $REACT_APP_API_SERVER_URI | ||
ENV REACT_APP_AUTH_SERVER_URI $REACT_APP_AUTH_SERVER_URI | ||
ENV REACT_APP_SPIRE_HEALTH_CHECK_ENABLE $REACT_APP_SPIRE_HEALTH_CHECK_ENABLE | ||
ENV REACT_APP_SPIRE_HEALTH_CHECK_FREQ_SEC $REACT_APP_SPIRE_HEALTH_CHECK_FREQ_SEC | ||
# ENV NODE_OPTIONS $NODE_OPTIONS | ||
# ARG NODE_OPTIONS=--openssl-legacy-provider | ||
|
||
ENV PORT_FE=3000 | ||
EXPOSE $PORT_FE | ||
|
||
# CMD ["serve", "-s", "."] | ||
# CMD ["sh", "-c", "PORT=$PORT_FE serve -s build"] | ||
# CMD ["npm", "start"] | ||
|
||
CMD serve -s . -p $PORT_FE | ||
|
||
# CMD REACT_APP_API_SERVER_URI=$REACT_APP_API_SERVER_URI \ | ||
# REACT_APP_AUTH_SERVER_URI=$REACT_APP_AUTH_SERVER_URI \ | ||
# REACT_APP_SPIRE_HEALTH_CHECK_ENABLE=$REACT_APP_SPIRE_HEALTH_CHECK_ENABLE \ | ||
# REACT_APP_SPIRE_HEALTH_CHECK_FREQ_SEC=$REACT_APP_SPIRE_HEALTH_CHECK_FREQ_SEC \ | ||
# serve -s . -p $PORT_FE | ||
CMD ["npm", "start"] |
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
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,6 +1,4 @@ | ||
REACT_APP_API_SERVER_URI=http://localhost:10000/ | ||
REACT_APP_AUTH_SERVER_URI=http://localhost:8080/ | ||
#REACT_APP_AUTH_SERVER_URI=http://localhost:8080/ | ||
##### To check SPIRE health ##### | ||
REACT_APP_SPIRE_HEALTH_CHECK_ENABLE=false | ||
# REACT_APP_SPIRE_HEALTH_CHECK_TIME is in seconds | ||
REACT_APP_SPIRE_HEALTH_CHECK_FREQ_SEC=120 | ||
REACT_APP_SPIRE_HEALTH_CHECK_ENABLE=false |
Oops, something went wrong.