diff --git a/.github/workflows/build-dev.yaml b/.github/workflows/build-dev.yaml index f32fcd4e..eb0c4798 100644 --- a/.github/workflows/build-dev.yaml +++ b/.github/workflows/build-dev.yaml @@ -43,12 +43,5 @@ jobs: with: context: . push: true - build-args: | - VITE_MAPBOX_API_TOKEN=${{ secrets.MAPBOX_API_TOKEN }} - VITE_MACROSTRAT_TILESERVER_V1=https://tiles.macrostrat.org - VITE_MACROSTRAT_TILESERVER_DOMAIN=https://tileserver.macrostrat-dev.chtc.io - VITE_MACROSTRAT_API_DOMAIN= - VITE_CORELLE_API_DOMAIN=https://rotate.macrostrat.org - PUBLIC_URL=/map/ tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/.github/workflows/build-prod.yaml b/.github/workflows/build-prod.yaml index 873bca1d..1b3df76f 100644 --- a/.github/workflows/build-prod.yaml +++ b/.github/workflows/build-prod.yaml @@ -39,13 +39,6 @@ jobs: uses: docker/build-push-action@v3 with: context: . - build-args: | - VITE_MAPBOX_API_TOKEN=${{ secrets.MAPBOX_API_TOKEN }} - VITE_MACROSTRAT_TILESERVER_V1=https://tiles.macrostrat.org - VITE_MACROSTRAT_TILESERVER_DOMAIN=https://tileserver.macrostrat-dev.chtc.io - VITE_MACROSTRAT_API_DOMAIN= - VITE_CORELLE_API_DOMAIN=https://rotate.macrostrat.org - PUBLIC_URL=/map/ push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/Dockerfile b/Dockerfile index 7e9d0d19..956ec398 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,23 +1,5 @@ FROM node:20 AS build -ARG VITE_MAPBOX_API_TOKEN -ENV VITE_MAPBOX_API_TOKEN=$VITE_MAPBOX_API_TOKEN - -ARG VITE_MACROSTRAT_TILESERVER_V2 -ENV VITE_MACROSTRAT_TILESERVER_V2=$VITE_MACROSTRAT_TILESERVER_V2 - -ARG VITE_MACROSTRAT_TILESERVER_V1 -ENV VITE_MACROSTRAT_TILESERVER_V1=$VITE_MACROSTRAT_TILESERVER_V1 - -ARG VITE_MACROSTRAT_TILESERVER_DOMAIN -ENV VITE_MACROSTRAT_TILESERVER_DOMAIN=$VITE_MACROSTRAT_TILESERVER_DOMAIN - -ARG VITE_MACROSTRAT_API_DOMAIN -ENV VITE_MACROSTRAT_API_DOMAIN=$VITE_MACROSTRAT_API_DOMAIN - -ARG VITE_CORELLE_API_DOMAIN -ENV VITE_CORELLE_API_DOMAIN=$VITE_CORELLE_API_DOMAIN - ENV NODE_ENV=production WORKDIR /usr/src/app @@ -25,6 +7,5 @@ COPY . ./ RUN yarn cache clean RUN yarn add -RUN yarn run bundle -CMD ["yarn", "run", "server"] +CMD ["sh", "server/server.sh"] diff --git a/server/index.js b/server/index.js index 05320921..0a9e24ce 100644 --- a/server/index.js +++ b/server/index.js @@ -56,7 +56,7 @@ async function startServer() { return next() } else { const { body, statusCode, headers, earlyHints } = httpResponse - if (res.writeEarlyHints) res.writeEarlyHints({ link: earlyHints.map((e) => e.earlyHintLink) }) + // if (res.writeEarlyHints) res.writeEarlyHints({ link: earlyHints.map((e) => e.earlyHintLink) }) headers.forEach(([name, value]) => res.setHeader(name, value)) res.status(statusCode) if (!res.hasHeader('Content-Type')) res.setHeader('Content-Type', 'text/html'); diff --git a/server/server.sh b/server/server.sh new file mode 100644 index 00000000..866a1013 --- /dev/null +++ b/server/server.sh @@ -0,0 +1,2 @@ +yarn run bundle +yarn run server \ No newline at end of file