Skip to content

Commit

Permalink
Fix fallback issue
Browse files Browse the repository at this point in the history
  • Loading branch information
qgerome committed Apr 13, 2022
1 parent 6ba31e2 commit b9bf1cd
Show file tree
Hide file tree
Showing 7 changed files with 783 additions and 739 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build_docker_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
build-args: |
"SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}"
"RELEASE=${{ steps.version.outputs.number }}"
"FALLBACK_URL=https://app.demo.openhexa.org"
- name: Build and push (manual)
if: ${{ github.event_name == 'workflow_dispatch' }}
Expand All @@ -63,3 +64,4 @@ jobs:
build-args: |
"SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}"
"RELEASE=${{ steps.version.outputs.number }}"
"FALLBACK_URL=https://app.demo.openhexa.org"
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ COPY --from=deps /code/node_modules ./node_modules

ARG RELEASE
ARG SENTRY_AUTH_TOKEN
ARG FALLBACK_URL

ENV SENTRY_RELEASE=${RELEASE}
ENV NEXT_PUBLIC_RELEASE=${RELEASE}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,12 @@ The following environment variables should be provided at build time (for the `d

- `RELEASE`: a release identifier, such as a Git tag (used for uploading source maps to Sentry)
- `SENTRY_AUTH_TOKEN`: A valid Sentry authentication token
- `FALLBACK_URL`: the URL the traffic will be redirected to if NextJS cannot answer the request

The following environment variables should be provided at run time:
- `GRAPHQL_ENDPOINT`: the URL of the OpenHexa GraphQL API
- `SENTRY_DSN`: the [Sentry](https://sentry.io/) DSN
- `SENTRY_ENVIRONMENT`: the [Sentry](https://sentry.io/) environment tag
- `FALLBACK_URL`: the URL the traffic will be redirected to if NextJS cannot answer the request


## Local development
Expand Down
1 change: 1 addition & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const config = {
return {
// After checking all Next.js pages (including dynamic routes)...
// ...and static files we proxy any other requests
beforeFiles: [],
fallback: [
// Proxied static files do not need to have a trailing slash
{
Expand Down
Loading

0 comments on commit b9bf1cd

Please sign in to comment.