Skip to content

Commit

Permalink
clean up webhook test
Browse files Browse the repository at this point in the history
  • Loading branch information
xeroxis-xs committed Sep 30, 2024
1 parent bd131c9 commit 5f5cb74
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 150 deletions.
12 changes: 0 additions & 12 deletions .run/Docker Image Pull.run.xml

This file was deleted.

98 changes: 7 additions & 91 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,100 +1,12 @@
## Stage 1: Build the Next.js app
#FROM node:20-alpine AS build
#
#WORKDIR /app
#
## Install dependencies
#COPY package.json package-lock.json ./
#RUN npm install
#
## Copy all files and build the project
#COPY . .
#
##ARG NEXT_PUBLIC_SITE_URL
##ARG NEXT_PUBLIC_AZURE_CLIENT_ID
##ARG NEXT_PUBLIC_AZURE_REDIRECT_URI
##ARG NEXT_PUBLIC_BACKEND_URL
##ARG NEXT_PUBLIC_MICROSERVICE_URL
##ARG NEXT_PUBLIC_LOGIN_REQUEST_SCOPE
##
##ENV NEXT_PUBLIC_SITE_URL=$NEXT_PUBLIC_SITE_URL \
## NEXT_PUBLIC_AZURE_CLIENT_ID=$NEXT_PUBLIC_AZURE_CLIENT_ID \
## NEXT_PUBLIC_AZURE_REDIRECT_URI=$NEXT_PUBLIC_AZURE_REDIRECT_URI \
## NEXT_PUBLIC_BACKEND_URL=$NEXT_PUBLIC_BACKEND_URL \
## NEXT_PUBLIC_MICROSERVICE_URL=$NEXT_PUBLIC_MICROSERVICE_URL \
## NEXT_PUBLIC_LOGIN_REQUEST_SCOPE=$NEXT_PUBLIC_LOGIN_REQUEST_SCOPE
#
## Temporary set the env variables and Build the project
#RUN npm run build
## Stage 2: Run the Next.js app
#FROM node:20-alpine
#
#WORKDIR /app
#
## Install necessary dependencies
#RUN apk add --no-cache libc6-compat
#
## Copy the built files from the previous stage
#COPY --from=build /app ./
#
## Expose the port the app runs on
#EXPOSE 80
#
##COPY --chown=nextjs:nodejs entrypoint.sh /entrypoint.sh
##RUN chmod +x /entrypoint.sh
##ENTRYPOINT ["/entrypoint.sh"]
#
## Start the Next.js app
#CMD ["npm", "start"]



## Stage 1: Build the Next.js app
#FROM node:20-alpine AS build
#
#WORKDIR /app
#
## Install dependencies
#COPY package.json package-lock.json ./
#RUN npm install
#
## Copy all files and build the project
#COPY . .
#
## Temporary set the env variables and Build the project
#RUN NEXT_PUBLIC_AZURE_CLIENT_ID=PLACEHOLDER_NEXT_PUBLIC_AZURE_CLIENT_ID NEXT_PUBLIC_AZURE_REDIRECT_URI=PLACEHOLDER_NEXT_PUBLIC_AZURE_REDIRECT_URI NEXT_PUBLIC_SITE_URL=PLACEHOLDER_NEXT_PUBLIC_SITE_URL NEXT_PUBLIC_BACKEND_URL=PLACEHOLDER_NEXT_PUBLIC_BACKEND_URL NEXT_PUBLIC_MICROSERVICE_URL=PLACEHOLDER_NEXT_PUBLIC_MICROSERVICE_URL NEXT_PUBLIC_LOGIN_REQUEST_SCOPE=PLACEHOLDER_NEXT_PUBLIC_LOGIN_REQUEST_SCOPE npm run build
#
## Stage 2: Run the Next.js app
#FROM node:20-alpine
#
#WORKDIR /app
#
## Install necessary dependencies
#RUN apk add --no-cache libc6-compat
#
## Copy the built files from the previous stage
#COPY --from=build /app ./
#
#ENV PORT=80
#
## Expose the port the app runs on
#EXPOSE 80
#
#COPY --chown=nextjs:nodejs entrypoint.sh /entrypoint.sh
#RUN chmod +x /entrypoint.sh
##ENTRYPOINT ["/entrypoint.sh"]
#
## Start the Next.js app
#CMD ["npm", "start"]


# Stage 1: Install dependencies
FROM node:20-alpine AS dependencies
RUN apk add --no-cache libc6-compat
WORKDIR /home/app
COPY package.json ./
COPY package-lock.json ./
RUN npm i

# Stage 2: Build the app
FROM node:20-alpine AS builder
WORKDIR /home/app
COPY --from=dependencies /home/app/node_modules ./node_modules
Expand All @@ -104,8 +16,8 @@ ARG NODE_ENV
ENV NODE_ENV=${NODE_ENV}
RUN npm run build

# Stage 3: Create the final image
FROM node:18-slim AS runner

WORKDIR /home/app
ENV NEXT_TELEMETRY_DISABLED=1
ENV NODE_ENV=production
Expand All @@ -115,12 +27,16 @@ COPY --from=builder /home/app/.next/static /home/app/standalone/.next/static
COPY --from=builder /home/app/entrypoint.sh ./scripts/entrypoint.sh
COPY --from=builder /home/app/.env.production ./.env.production

# Set the environment variables
ENV PORT=80
EXPOSE 80
ENV HOSTNAME="0.0.0.0"

# Make the entrypoint script executable
RUN chmod +x ./scripts/entrypoint.sh

# Run the entrypoint script to set the environment variables
ENTRYPOINT [ "./scripts/entrypoint.sh" ]

# Start the server
CMD ["node", "./standalone/server.js"]
20 changes: 0 additions & 20 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,3 @@
#services:
# eduquest-frontend:
# build:
# context: .
# dockerfile: Dockerfile
# entrypoint: ["/entrypoint.sh"]
# ports:
# - "3000:80"
# restart: always
# volumes:
# - /app/node_modules
# - /app/.next
# environment:
# NEXT_PUBLIC_SITE_URL: ${NEXT_PUBLIC_SITE_URL}
# NEXT_PUBLIC_AZURE_CLIENT_ID: ${NEXT_PUBLIC_AZURE_CLIENT_ID}
# NEXT_PUBLIC_AZURE_REDIRECT_URI: ${NEXT_PUBLIC_AZURE_REDIRECT_URI}
# NEXT_PUBLIC_BACKEND_URL: ${NEXT_PUBLIC_BACKEND_URL}
# NEXT_PUBLIC_MICROSERVICE_URL: ${NEXT_PUBLIC_MICROSERVICE_URL}
# NEXT_PUBLIC_LOGIN_REQUEST_SCOPE: ${NEXT_PUBLIC_LOGIN_REQUEST_SCOPE}
#
services:
frontend:
build:
Expand Down
19 changes: 0 additions & 19 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
#services:
# eduquest-frontend:
# image: xeroxisxs/eduquest-frontend-nextjs:latest
# entrypoint: ["/entrypoint.sh"]
# ports:
# - "80:80"
# restart: always
# volumes:
# - /app/node_modules
# - /app/.next
# environment:
# NEXT_PUBLIC_SITE_URL: ${NEXT_PUBLIC_SITE_URL}
# NEXT_PUBLIC_AZURE_CLIENT_ID: ${NEXT_PUBLIC_AZURE_CLIENT_ID}
# NEXT_PUBLIC_AZURE_REDIRECT_URI: ${NEXT_PUBLIC_AZURE_REDIRECT_URI}
# NEXT_PUBLIC_BACKEND_URL: ${NEXT_PUBLIC_BACKEND_URL}
# NEXT_PUBLIC_MICROSERVICE_URL: ${NEXT_PUBLIC_MICROSERVICE_URL}
# NEXT_PUBLIC_LOGIN_REQUEST_SCOPE: ${NEXT_PUBLIC_LOGIN_REQUEST_SCOPE}


services:
frontend:
image: xeroxisxs/eduquest-frontend-reactjs:latest
Expand Down
8 changes: 0 additions & 8 deletions src/components/auth/sign-in-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,6 @@ export function SignInForm({ error }: SignInFormProps): React.JSX.Element {
<Typography align="center" variant="h6">
Welcome to EduQuest!
</Typography>
{/*<Typography align="center" variant="body1">*/}
{/* {process.env.NEXT_PUBLIC_AZURE_CLIENT_ID}*/}
{/* {process.env.NEXT_PUBLIC_AZURE_REDIRECT_URI}*/}
{/* {process.env.NEXT_PUBLIC_SITE_URL}*/}
{/* {process.env.NEXT_PUBLIC_BACKEND_URL}*/}
{/* {process.env.NEXT_PUBLIC_MICROSERVICE_URL}*/}
{/* {process.env.NEXT_PUBLIC_LOGIN_REQUEST_SCOPE}*/}
{/*</Typography>*/}
<Typography align="center" variant="body1">
A platform for you to learn and earn.
</Typography>
Expand Down

0 comments on commit 5f5cb74

Please sign in to comment.