From 4c8708e871e8338c6be1d6e652455599ec5b5253 Mon Sep 17 00:00:00 2001 From: Jacek Nykis Date: Tue, 27 Feb 2024 13:13:44 +0000 Subject: [PATCH] Test PR to trigger PR preview for testing ### What Test PR to trigger PR preview for testing ### Why I need a way to test PR previews for laboratory-v2 ### Issue addressed by this PR https://github.com/stellar/ops/issues/2846 --- Dockerfile | 28 +++++++--------------------- README.md | 1 + next.config.js | 2 +- 3 files changed, 9 insertions(+), 22 deletions(-) diff --git a/Dockerfile b/Dockerfile index 91d88475..883f9bb8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,25 +1,11 @@ -FROM ubuntu:22.04 as build +FROM node:18-alpine -LABEL maintainer="SDF Ops Team " - -RUN mkdir -p /app +ENV NEXT_TELEMETRY_DISABLED 1 +ENV PORT 80 WORKDIR /app - -ENV DEBIAN_FRONTEND=noninteractive -RUN apt-get update && apt-get install --no-install-recommends -y gpg curl git make ca-certificates apt-transport-https && \ - curl -sSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key|gpg --dearmor >/etc/apt/trusted.gpg.d/nodesource-key.gpg && \ - echo "deb https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \ - curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg |gpg --dearmor >/etc/apt/trusted.gpg.d/yarnpkg.gpg && \ - echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \ - apt-get update && apt-get install -y nodejs yarn && apt-get clean - - -COPY . /app/ -RUN yarn git-info +COPY . . RUN yarn install RUN yarn build - -FROM nginx:1.17 - -COPY --from=build /app/build/ /usr/share/nginx/html/ -COPY --from=build /app/nginx.conf /etc/nginx/conf.d/default.conf +# Run on port 80 for compatibility with laboratory v1 +EXPOSE 80 +CMD ["npm", "start"] diff --git a/README.md b/README.md index c4033664..6abc1616 100644 --- a/README.md +++ b/README.md @@ -34,3 +34,4 @@ You can check out [the Next.js GitHub repository](https://github.com/vercel/next The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. + diff --git a/next.config.js b/next.config.js index 32f40750..4f8fd9e0 100644 --- a/next.config.js +++ b/next.config.js @@ -1,6 +1,6 @@ /** @type {import('next').NextConfig} */ const nextConfig = { - output: "export", + //output: "export", distDir: "build", };