forked from guidewire-oss/fern-ui
-
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.
Merge pull request guidewire-oss#13 from tedd-E/chore/dynamically_con…
…figure_fern_backend_url Chore: Dynamically configure the API URL for Fern Reporter backend
- Loading branch information
Showing
8 changed files
with
3,188 additions
and
9,333 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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
VITE_FERN_REPORTER_BASE_URL=http://localhost:8080/api | ||
VITE_FERN_REPORTER_HEADER_NAME="Fern Acceptance Test Report" |
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,15 @@ | ||
FROM --platform=${BUILDPLATFORM} node:18 AS base | ||
WORKDIR /app/refine | ||
COPY . . | ||
COPY entrypoint.sh /usr/local/bin/ | ||
RUN chmod +x /usr/local/bin/entrypoint.sh | ||
|
||
RUN rm -rf node_modules # remove this due to incompatible architecture between arm and amd | ||
RUN npm install | ||
RUN npm run build | ||
EXPOSE 4173 | ||
CMD ["npm", "run", "start"] | ||
|
||
EXPOSE 9091 | ||
# Set the entrypoint to the script | ||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] | ||
|
||
CMD ["npm", "run", "start", "--", "--port", "9091"] |
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,10 @@ | ||
#!/bin/sh | ||
|
||
# Replace VITE_FERN_REPORTER_BASE_URL in the .env file with the value of the environment variable | ||
sed -i "s|VITE_FERN_REPORTER_BASE_URL=.*|VITE_FERN_REPORTER_BASE_URL=${VITE_FERN_REPORTER_BASE_URL}|g" /app/refine/.env | ||
|
||
# Build the application again since environment variables get embedded at build time rather than runtime | ||
npm run build | ||
|
||
# Execute the command passed to the container | ||
exec "$@" |
Large diffs are not rendered by default.
Oops, something went wrong.
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