-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into 332-handle-conditional-fields
- Loading branch information
Showing
30 changed files
with
1,396 additions
and
400 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
NEXTAUTH_SECRET= | ||
NEXTAUTH_URL= | ||
CLIENT_ID= | ||
CLIENT_SECRET= | ||
NEXT_PUBLIC_TOKEN= | ||
|
||
# uncomment the “SENTRY” prefixed variables below if you are using sentry and need to catch errors in local dev | ||
# SENTRY_DSN=ref: https://docs.sentry.io/product/sentry-basics/concepts/dsn-explainer/#where-to-find-your-dsn | ||
# SENTRY_URL=https://sentry.io/ | ||
# SENTRY_ORG= ref: https://github.com/getsentry/sentry-webpack-plugin#options (org) | ||
# SENTRY_PROJECT= ref: https://github.com/getsentry/sentry-webpack-plugin#options (project) | ||
# SENTRY_AUTH_TOKEN= ref: https://github.com/getsentry/sentry-webpack-plugin#options (authToken) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,24 @@ | ||
# we are running the build in vercel now so we don't need this github action | ||
# commenting this out because this action kept failing on https://github.com/scientist-softserv/webstore/pull/268 | ||
# TODO(alishaevn): figure out the sentry error if we switch from vercel to an in house deploy infrastructure | ||
name: "Build Docker Images" | ||
run-name: Build of ${{ github.ref_name }} by @${{ github.actor }} | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
inputs: | ||
debug_enabled: | ||
type: boolean | ||
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' | ||
required: false | ||
default: false | ||
|
||
# name: "Build Docker Images" | ||
# run-name: Build of ${{ github.ref_name }} by @${{ github.actor }} | ||
# on: | ||
# push: | ||
# branches: | ||
# - main | ||
# pull_request: | ||
# branches: | ||
# - main | ||
# workflow_dispatch: | ||
# inputs: | ||
# debug_enabled: | ||
# type: boolean | ||
# description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' | ||
# required: false | ||
# default: false | ||
|
||
# env: | ||
# REGISTRY: ghcr.io | ||
|
||
# jobs: | ||
# build: | ||
# runs-on: ubuntu-latest | ||
# permissions: | ||
# contents: read | ||
# packages: write | ||
# steps: | ||
# - id: setup | ||
# name: Setup | ||
# uses: scientist-softserv/actions/setup-env@v0.0.10 | ||
# with: | ||
# tag: ${{ inputs.tag }} | ||
# image_name: ${{ inputs.image_name }} | ||
# token: ${{ secrets.CHECKOUT_TOKEN || secrets.GITHUB_TOKEN }} | ||
# - uses: actions/setup-node@v3 | ||
# with: | ||
# registry-url: 'https://npm.pkg.github.com' | ||
# # Defaults to the user or organization that owns the workflow file | ||
# scope: '@scientist-softserv' | ||
# node-version-file: package.json | ||
# - name: GPR authToken | ||
# run: echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" > $NPM_CONFIG_USERCONFIG | ||
# - name: GPR alias | ||
# run: echo "@scientist-softserv:registry=https://npm.pkg.github.com" >> $NPM_CONFIG_USERCONFIG | ||
# - run: yarn install | ||
# - run: yarn test | ||
|
||
# - name: Login to GitHub Container Registry | ||
# uses: docker/login-action@v2 | ||
# with: | ||
# registry: ${{ env.REGISTRY }} | ||
# username: ${{ github.actor }} | ||
# password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# - name: Retag action for Docker image | ||
# id: meta-docker-image | ||
# uses: docker/metadata-action@v4.1.1 | ||
# with: | ||
# images: | | ||
# name=${{ env.REGISTRY }}/${{ env.REPO_LOWER }} | ||
# tags: | | ||
# type=raw,value=latest,enable={{is_default_branch}} | ||
|
||
# - run: cp $NPM_CONFIG_USERCONFIG .npmrc; cat .npmrc | ||
|
||
# - name: Build and push Docker image | ||
# uses: docker/build-push-action@v3 | ||
# with: | ||
# cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.REPO_LOWER }}:${{ env.TAG }} | ||
# context: . | ||
# push: true | ||
# tags: | | ||
# ${{ steps.meta-docker-image.outputs.tags }} | ||
# ${{ env.REGISTRY }}/${{ env.REPO_LOWER }}:${{ env.TAG }} | ||
jobs: | ||
build: | ||
uses: scientist-softserv/actions/.github/workflows/build.yaml@v0.0.16 | ||
secrets: inherit | ||
with: | ||
platforms: "linux/amd64" | ||
webTarget: web |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,14 @@ | ||
FROM node:18-alpine AS builder | ||
|
||
ENV NODE_ENV=production \ | ||
NEXT_TELEMETRY_DISABLED=1 | ||
|
||
WORKDIR /home/node/app | ||
|
||
ADD . /home/node/app | ||
|
||
# https://github.com/vercel/next.js/discussions/22149#discussioncomment-366180 | ||
RUN yarn install && yarn build && npm prune --omit=dev | ||
|
||
FROM node:18-alpine | ||
FROM node:18-alpine as web | ||
|
||
ENV NODE_ENV="production" \ | ||
NEXT_TELEMETRY_DISABLED=1 | ||
|
||
WORKDIR /home/node/app | ||
RUN yarn add --dev eslint | ||
|
||
# https://javascript.plainenglish.io/reduce-docker-image-size-for-your-next-js-app-bcb65d322222 | ||
# and | ||
# https://nextjs.org/docs/advanced-features/output-file-tracing | ||
COPY --from=builder /home/node/app/package.json /home/node/app/ | ||
COPY --from=builder /home/node/app/yarn.lock /home/node/app/ | ||
COPY --from=builder /home/node/app/next.config.js /home/node/app/ | ||
COPY --from=builder /home/node/app/public /home/node/app/public | ||
COPY --from=builder /home/node/app/.next/standalone /home/node/app/ | ||
COPY --from=builder /home/node/app/.next/static /home/node/app/.next/static | ||
COPY package.json yarn.lock /home/node/app/ | ||
RUN yarn | ||
|
||
CMD ["node", "server.js"] | ||
COPY . /home/node/app | ||
RUN yarn build | ||
CMD ["yarn", "start"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/sh | ||
|
||
# This script wraps up helm deployment. It is meant as a clear starting point for | ||
# commandline deployment or CI based deployment. It requires the following ENV vars be set | ||
# | ||
# CHART_VERSION: this is the version of the hyrax chart you want to deploy. default - 0.22.0 | ||
# DEPLOY_IMAGE: this is the build image that runs the rails application. Typically this would run puma or passenger. eg: samvera/hyrax or ghcr.io/samvera/hyku. Defaults to gcrh.io/samvera/hyku | ||
# DEPLOY_TAG: name of of the tag you want to deploy for deploy image. eg: "latest" or "v3.0.1" or "f123asdf1". Defaults to latest | ||
# HELM_EXTRA_ARGS: any additional arguments you'd like passed to helm upgrade directly. can be blank. | ||
|
||
if [ -z "$1" ] || [ -z "$2" ] | ||
then | ||
echo './bin/helm_deploy RELEASE_NAME NAMESPACE' | ||
exit 1 | ||
fi | ||
release_name="${1}" | ||
namespace="${2}" | ||
|
||
HELM_EXTRA_ARGS="${HELM_EXTRA_ARGS}:---values ops/production-deploy.yaml" | ||
DEPLOY_IMAGE="${DEPLOY_IMAGE:-ghcr.io/scientist-softserv/webstore}" | ||
DEPLOY_TAG="${DEPLOY_TAG:-latest}" | ||
|
||
helm upgrade \ | ||
--install \ | ||
--atomic \ | ||
--timeout 15m0s \ | ||
--set image.repository="$DEPLOY_IMAGE" \ | ||
--set image.tag="$DEPLOY_TAG" \ | ||
--values ops/production-deploy.yaml \ | ||
--namespace="$namespace" \ | ||
--create-namespace \ | ||
"$release_name" \ | ||
./charts/webstore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.