Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
1ce56dc
Bump yaml from 2.3.3 to 2.3.4
dependabot[bot] Dec 4, 2023
354d85b
Bump mobx from 6.11.0 to 6.12.0
dependabot[bot] Dec 4, 2023
8c0c5b5
Bump eslint from 8.52.0 to 8.56.0
dependabot[bot] Dec 18, 2023
a11b02c
Bump follow-redirects from 1.15.3 to 1.15.4
dependabot[bot] Jan 11, 2024
bee8129
Bump follow-redirects in /.github/actions/invite-user
dependabot[bot] Jan 11, 2024
d173b40
Bump @octokit/core from 5.0.1 to 5.1.0
dependabot[bot] Jan 22, 2024
9907c4a
Add Dockerfile
ulrikandersen Jan 26, 2024
54d3ede
Add workflow for building docker image
ulrikandersen Jan 26, 2024
938ec43
Merge pull request #190 from shapehq/docker
ulrikandersen Jan 26, 2024
36ab5c4
Bump @types/react from 18.2.31 to 18.2.53
dependabot[bot] Feb 5, 2024
3936d42
Merge branch 'develop' into dependabot/npm_and_yarn/yaml-2.3.4
simonbs Feb 5, 2024
e20563b
Merge pull request #177 from shapehq/dependabot/npm_and_yarn/yaml-2.3.4
simonbs Feb 5, 2024
f5a25d9
Merge branch 'develop' into dependabot/npm_and_yarn/mobx-6.12.0
simonbs Feb 5, 2024
203f0a0
Merge pull request #183 from shapehq/dependabot/npm_and_yarn/eslint-8…
simonbs Feb 5, 2024
e61c982
Merge pull request #186 from shapehq/dependabot/npm_and_yarn/follow-r…
simonbs Feb 5, 2024
626d074
Merge pull request #191 from shapehq/dependabot/npm_and_yarn/types/re…
simonbs Feb 5, 2024
70ea0ce
Merge pull request #187 from shapehq/dependabot/npm_and_yarn/dot-gith…
simonbs Feb 5, 2024
bee3951
Merge pull request #180 from shapehq/dependabot/npm_and_yarn/mobx-6.12.0
simonbs Feb 5, 2024
041f931
Merge pull request #188 from shapehq/dependabot/npm_and_yarn/octokit/…
simonbs Feb 5, 2024
d695605
Enable persistAuthorization for Swagger UI
ulrikandersen Feb 22, 2024
607d624
Merge pull request #204 from shapehq/feature/swagger-ui-persist-autho…
ulrikandersen Feb 22, 2024
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
6 changes: 3 additions & 3 deletions .github/actions/invite-user/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions .github/workflows/build-docker-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: "Build Docker image"

on:
workflow_dispatch: {}

jobs:
build:
name: Build
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Build the app and Docker image
run: |
docker build -t shapedocs .
67 changes: 67 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
FROM node:18-alpine AS base

# Install dependencies only when needed
FROM base AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app

# Install dependencies based on the preferred package manager
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
RUN \
if [ -f yarn.lock ]; then yarn --frozen-lockfile; \
elif [ -f package-lock.json ]; then npm ci; \
elif [ -f pnpm-lock.yaml ]; then yarn global add pnpm && pnpm i --frozen-lockfile; \
else echo "Lockfile not found." && exit 1; \
fi


# Rebuild the source code only when needed
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .

# Next.js collects completely anonymous telemetry data about general usage.
# Learn more here: https://nextjs.org/telemetry
# Uncomment the following line in case you want to disable telemetry during the build.
# ENV NEXT_TELEMETRY_DISABLED 1

RUN yarn build

# If using npm comment out above and use below instead
# RUN npm run build

# Production image, copy all the files and run next
FROM base AS runner
WORKDIR /app

ENV NODE_ENV production
# Uncomment the following line in case you want to disable telemetry during runtime.
# ENV NEXT_TELEMETRY_DISABLED 1

RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs

COPY --from=builder /app/public ./public

# Set the correct permission for prerender cache
RUN mkdir .next
RUN chown nextjs:nodejs .next

# Automatically leverage output traces to reduce image size
# https://nextjs.org/docs/advanced-features/output-file-tracing
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static

USER nextjs

EXPOSE 3000

ENV PORT 3000
# set hostname to localhost
ENV HOSTNAME "0.0.0.0"

# server.js is created by next build from the standalone output
# https://nextjs.org/docs/pages/api-reference/next-config-js/output
CMD ["node", "server.js"]
72 changes: 36 additions & 36 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"@mui/icons-material": "^5.14.18",
"@mui/material": "^5.14.18",
"@octokit/auth-app": "^6.0.1",
"@octokit/core": "^5.0.1",
"@octokit/core": "^5.1.0",
"@octokit/webhooks": "^12.0.3",
"@stoplight/elements": "^7.15.3",
"auth0": "^4.1.0",
Expand All @@ -32,7 +32,7 @@
"figma-squircle": "^0.3.1",
"install": "^0.13.0",
"ioredis": "^5.3.2",
"mobx": "^6.11.0",
"mobx": "^6.12.0",
"next": "14.0.2",
"npm": "^10.2.4",
"octokit": "^3.1.2",
Expand All @@ -44,7 +44,7 @@
"swagger-ui-react": "^5.9.1",
"swr": "^2.2.4",
"usehooks-ts": "^2.9.1",
"yaml": "^2.3.3",
"yaml": "^2.3.4",
"zod": "^3.22.4"
},
"devDependencies": {
Expand All @@ -56,7 +56,7 @@
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.1",
"autoprefixer": "^10",
"eslint": "^8.52.0",
"eslint": "^8.56.0",
"eslint-config-next": "14.0.3",
"postcss": "^8",
"tailwindcss": "^3",
Expand Down
2 changes: 1 addition & 1 deletion src/features/docs/view/Swagger.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const Swagger = ({ url }: { url: string }) => {
const [isLoading, setLoading] = useState(true)
return (
<LoadingWrapper showLoadingIndicator={isLoading}>
<SwaggerUI url={url} onComplete={() => setLoading(false)} deepLinking />
<SwaggerUI url={url} onComplete={() => setLoading(false)} deepLinking persistAuthorization />
</LoadingWrapper>
)
}
Expand Down