mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 17:31:56 +03:00
76ceb707f4
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.
30 lines
815 B
Docker
30 lines
815 B
Docker
FROM node:8
|
|
|
|
ARG gcloud_version="207.0.0"
|
|
|
|
# update npm
|
|
RUN npm install -g npm@5
|
|
|
|
# install dependencies
|
|
RUN apt-get update && apt-get install -y \
|
|
netcat \
|
|
libpq5 \
|
|
libgtk2.0-0 \
|
|
libnotify-dev \
|
|
libgconf-2-4 \
|
|
libnss3 \
|
|
libxss1 \
|
|
libasound2 \
|
|
xvfb \
|
|
&& curl -Lo /tmp/gcloud-${gcloud_version}.tar.gz https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${gcloud_version}-linux-x86_64.tar.gz \
|
|
&& tar -xzf /tmp/gcloud-${gcloud_version}.tar.gz -C /usr/local \
|
|
&& /usr/local/google-cloud-sdk/install.sh \
|
|
&& apt-get -y auto-remove \
|
|
&& apt-get -y clean \
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
&& rm -rf /usr/share/doc/ \
|
|
&& rm -rf /usr/share/man/ \
|
|
&& rm -rf /usr/share/locale/
|
|
|
|
ENV PATH "/usr/local/google-cloud-sdk/bin:$PATH"
|