这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@shahidhk
Copy link
Member

@shahidhk shahidhk commented May 15, 2019

This PR builds console static assets into the server docker image at /srv/console-assets. When env var HASURA_GRAPHQL_CONSOLE_ASSETS_DIR=/srv/console-assets or flag --console-assets-dir=/srv/console-assets is set on the server, the files in this directory are served at /console/assets/*.

The console html template will have a variable called cdnAssets: false when this flag is set and it loads assets from server itself instead of CDN.

The assets are moved to a new bucket with a new naming scheme:

graphql-engine-cdn.hasura.io/console/assets/
   /common/{}
   /versioned/<version/{}
   /channel/<channel>/<version>/{}

Console served by CLI will still load assets from CDN - will fix that in the next release.

@shahidhk shahidhk requested review from 0x777 and rikinsk-zz as code owners May 15, 2019 05:26
@netlify
Copy link

netlify bot commented May 15, 2019

Deploy preview for hasura-docs ready!

Built with commit 302adba

https://deploy-preview-2192--hasura-docs.netlify.com

@hasura hasura deleted a comment from hasura-bot May 15, 2019
0x777
0x777 previously approved these changes May 15, 2019
Copy link
Member

@0x777 0x777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Server side changes LGTM

@shahidhk shahidhk changed the title build console assets into server build console assets into server (close #516, close #521) May 16, 2019
rikinsk-zz
rikinsk-zz previously approved these changes May 16, 2019
Copy link

@rikinsk-zz rikinsk-zz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved (crossing fingers)

@shahidhk shahidhk changed the title build console assets into server (close #516, close #521) build console assets into server (close #516, close #521, close #2130) May 16, 2019
@shahidhk shahidhk added c/build-system Related to the build-release system c/cli Related to CLI c/console Related to console c/docs Related to docs c/server Related to server labels May 16, 2019
@shahidhk shahidhk changed the title build console assets into server (close #516, close #521, close #2130) bundle console assets into server (close #516, close #521, close #2130) May 16, 2019
@shahidhk shahidhk merged commit 76ceb70 into hasura:master May 16, 2019
@hasura-bot
Copy link
Contributor

Review app https://hge-ci-pull-2192.herokuapp.com is deleted

@mnlbox
Copy link
Contributor

mnlbox commented May 16, 2019

@shahidhk Based on this PR we need download asset file or use another docker image?
If we need download so please add some download link to docs or download page 😉

@shahidhk
Copy link
Member Author

polRk pushed a commit to polRk/graphql-engine that referenced this pull request Feb 12, 2020
…close hasura#2130) (hasura#2192)

This PR builds console static assets into the server docker image at `/srv/console-assets`. When env var `HASURA_GRAPHQL_CONSOLE_ASSETS_DIR=/srv/console-assets` or flag `--console-assets-dir=/srv/console-assets` is set on the server, the files in this directory are served at `/console/assets/*`.

The console html template will have a variable called `cdnAssets: false` when this flag is set and it loads assets from server itself instead of CDN.

The assets are moved to a new bucket with a new naming scheme:

```
graphql-engine-cdn.hasura.io/console/assets/
   /common/{}
   /versioned/<version/{}
   /channel/<channel>/<version>/{}
```

Console served by CLI will still load assets from CDN - will fix that in the next release.
hasura-bot pushed a commit that referenced this pull request Sep 22, 2025
…ip (#2192)

The LHS headers were getting lost, keep them.

V3_GIT_ORIGIN_REV_ID: 1dea4b42fb66a39700cab2559d171e7bc11cba8b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c/build-system Related to the build-release system c/cli Related to CLI c/console Related to console c/docs Related to docs c/server Related to server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants