Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CueWeb system #1356

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions cueweb/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
NEXT_PUBLIC_OPENCUE_ENDPOINT=http://your-rest-gateway-url.com

SENTRY_ENVIRONMENT='development'


# Authentication Configuration:

NEXT_PUBLIC_AUTH_PROVIDER=github,okta,google
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=canbeanything

# values from Okta OAuth 2.0
NEXT_AUTH_OKTA_CLIENT_ID=oktaid
NEXT_AUTH_OKTA_ISSUER=https://company.okta.com
NEXT_AUTH_OKTA_CLIENT_SECRET=oktasecret

# values from Google Cloud Platform OAuth 2.0
GOOGLE_CLIENT_ID=googleclientid
GOOGLE_CLIENT_SECRET=googleclientsecret

# values from Github OAuth 2.0
GITHUB_ID=githubid
GITHUB_SECRET=githubsecret
3 changes: 3 additions & 0 deletions cueweb/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["next/core-web-vitals", "prettier"]
}
4 changes: 4 additions & 0 deletions cueweb/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

# Sentry Config File
.sentryclirc
.env.local
1 change: 1 addition & 0 deletions cueweb/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.next
3 changes: 3 additions & 0 deletions cueweb/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"printWidth": 120
}
53 changes: 53 additions & 0 deletions cueweb/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
FROM node:21-alpine

WORKDIR /opt/cueweb

# If needed, you can change the registry where packages are fetched from
# RUN npm config set registry <your artifactory url>

# install dependencies before copying the source code
COPY package*.json ./

# when SENTRYCLI_USE_LOCAL is set to 1, sentry-cli binary will be discovered from $PATH and copied locally, instead
# of being downloaded from external servers. (https://docs.sentry.io/product/cli/installation/)
# This is necessary if the firewall blocks downloads from external servers
# sentry-cli is needed to upload source maps to sentry
# ENV SENTRYCLI_USE_LOCAL=1

# TODO: something in the sentry-cli is causing 'npm run build' to fail
# So for a temporary solution, skip downloading the sentry-cli binary entirely until a fix is found
ENV SENTRYCLI_SKIP_DOWNLOAD=1
RUN npm ci

COPY *.json /opt/cueweb/
COPY next.config.js /opt/cueweb/
COPY postcss.config.js /opt/cueweb/
COPY tailwind.config.js /opt/cueweb/
COPY app/ /opt/cueweb/app/
COPY components/ui /opt/cueweb/components/ui
COPY lib/ /opt/cueweb/lib/
COPY sentry.client.config.ts /opt/cueweb/sentry.client.config.ts
COPY sentry.server.config.ts /opt/cueweb/sentry.server.config.ts
COPY sentry.edge.config.ts /opt/cueweb/sentry.edge.config.ts
COPY public/ /opt/cueweb/public/

# needed to give permission to store cached data from 'fetch'
RUN chmod 777 /opt/cueweb

EXPOSE 3000

# for dev testing:
# CMD ["/bin/sh"]
# CMD ["npm", "run", "dev"]

# for production builds using Openshift (comment out all the following lines when testing locally):
# this is required to build Next.js or else it will throw errors. Actual env variables will be passed by Openshift
# change NEXT_PUBLIC_AUTH_PROVIDER to add the authentication providers used in the CueWeb application
ENV NEXT_PUBLIC_AUTH_PROVIDER=google,okta,github
ENV NEXTAUTH_SECRET=tobeoverriden
ENV NEXT_AUTH_OKTA_CLIENT_ID=tobeoverriden
ENV NEXT_AUTH_OKTA_ISSUER=tobeoverriden
ENV NEXT_AUTH_OKTA_CLIENT_SECRET=tobeoverriden
ENV NEXT_PUBLIC_AUTH_PROVIDER=okta
RUN npm run build
CMD ["npm", "run", "start"]
Loading