This commit is contained in:
parent
393ecf0c3f
commit
324f4ef0e2
27
Dockerfile
27
Dockerfile
@ -1,26 +1,19 @@
|
||||
FROM fascinated/docker-images:node-pnpm-latest as main
|
||||
|
||||
# Install dependencies only when needed
|
||||
FROM node:20 AS deps
|
||||
FROM main AS deps
|
||||
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
|
||||
#RUN apk add libc6-compat
|
||||
WORKDIR /app
|
||||
|
||||
# Install dependencies based on the preferred package manager
|
||||
COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./
|
||||
COPY pnpm-lock.yaml* ./
|
||||
|
||||
# Copy cached files
|
||||
#COPY node_modules ./
|
||||
|
||||
#RUN npm i
|
||||
|
||||
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
|
||||
# Install node modules
|
||||
RUN pnpm install --production
|
||||
|
||||
# Rebuild the source code only when needed
|
||||
FROM node:20 AS builder
|
||||
FROM main AS builder
|
||||
WORKDIR /app
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
@ -28,10 +21,10 @@ COPY . .
|
||||
ENV NEXT_TELEMETRY_DISABLED 1
|
||||
|
||||
# Build the project
|
||||
RUN yarn build
|
||||
RUN pnpm build
|
||||
|
||||
# Production image, copy all the files and run next
|
||||
FROM node:20-alpine AS runner
|
||||
FROM main AS runner
|
||||
WORKDIR /app
|
||||
|
||||
ENV NODE_ENV production
|
||||
@ -49,7 +42,7 @@ COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static
|
||||
COPY --from=builder --chown=nextjs:nodejs /app/public ./.next/static
|
||||
|
||||
RUN npm i -g @beam-australia/react-env
|
||||
RUN pnpm i -g @beam-australia/react-env
|
||||
|
||||
RUN chown -R nextjs:nodejs /app
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
"@beam-australia/react-env": "^3.1.1",
|
||||
"@emotion/cache": "^11.11.0",
|
||||
"@emotion/server": "^11.11.0",
|
||||
"@nextui-org/react": "^2.1.13",
|
||||
"@nextui-org/react": "1.0.0-beta.10",
|
||||
"@typescript-eslint/eslint-plugin": "^6.7.5",
|
||||
"@typescript-eslint/parser": "^6.7.5",
|
||||
"axios": "^1.5.1",
|
||||
|
2084
pnpm-lock.yaml
generated
2084
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -2,19 +2,19 @@ import { Navbar, Text } from "@nextui-org/react";
|
||||
import Settings from "./Settings";
|
||||
|
||||
const NavBar = (props) => {
|
||||
return (
|
||||
<Navbar isBordered variant={"sticky"}>
|
||||
<Navbar.Brand>
|
||||
<Text b color="inherit">
|
||||
BeatSaber Overlay
|
||||
</Text>
|
||||
</Navbar.Brand>
|
||||
return (
|
||||
<Navbar isBordered variant={"sticky"}>
|
||||
<Navbar.Brand>
|
||||
<Text b color="inherit">
|
||||
BeatSaber Overlay
|
||||
</Text>
|
||||
</Navbar.Brand>
|
||||
|
||||
<Navbar.Content>
|
||||
<Settings {...props}></Settings>
|
||||
</Navbar.Content>
|
||||
</Navbar>
|
||||
);
|
||||
<Navbar.Content>
|
||||
<Settings {...props}></Settings>
|
||||
</Navbar.Content>
|
||||
</Navbar>
|
||||
);
|
||||
};
|
||||
|
||||
export default NavBar;
|
||||
|
@ -6,56 +6,56 @@ import { VARS } from "../consts/EnvVars";
|
||||
import "../styles/globals.css";
|
||||
|
||||
const lightTheme = createTheme({
|
||||
type: "light",
|
||||
theme: {
|
||||
colors: {},
|
||||
},
|
||||
type: "light",
|
||||
theme: {
|
||||
colors: {},
|
||||
},
|
||||
});
|
||||
|
||||
const darkTheme = createTheme({
|
||||
type: "dark",
|
||||
theme: {
|
||||
colors: {},
|
||||
},
|
||||
type: "dark",
|
||||
theme: {
|
||||
colors: {},
|
||||
},
|
||||
});
|
||||
|
||||
function MyApp({ Component, pageProps }) {
|
||||
return (
|
||||
<>
|
||||
<DefaultSeo
|
||||
titleTemplate={`${env(VARS.SITE_NAME)} - %s`}
|
||||
title={env(VARS.SITE_TITLE)}
|
||||
description={env(VARS.SITE_DESCRIPTION)}
|
||||
openGraph={{
|
||||
url: env(VARS.SITE_URL),
|
||||
title: env(VARS.SITE_NAME),
|
||||
description: env(VARS.SITE_DESCRIPTION),
|
||||
siteName: env(VARS.SITE_NAME),
|
||||
images: [
|
||||
{
|
||||
url: "https://git.fascinated.cc/Fascinated/beatsaber-overlay/media/branch/main/assets/overlay.png",
|
||||
alt: "Site Example",
|
||||
},
|
||||
],
|
||||
}}
|
||||
twitter={{
|
||||
cardType: "summary_large_image",
|
||||
}}
|
||||
/>
|
||||
<NextThemesProvider
|
||||
storageKey="theme"
|
||||
attribute="class"
|
||||
value={{
|
||||
dark: darkTheme,
|
||||
light: lightTheme,
|
||||
}}
|
||||
>
|
||||
<NextUIProvider>
|
||||
<Component {...pageProps} />
|
||||
</NextUIProvider>
|
||||
</NextThemesProvider>
|
||||
</>
|
||||
);
|
||||
return (
|
||||
<>
|
||||
<DefaultSeo
|
||||
titleTemplate={`${env(VARS.SITE_NAME)} - %s`}
|
||||
title={env(VARS.SITE_TITLE)}
|
||||
description={env(VARS.SITE_DESCRIPTION)}
|
||||
openGraph={{
|
||||
url: env(VARS.SITE_URL),
|
||||
title: env(VARS.SITE_NAME),
|
||||
description: env(VARS.SITE_DESCRIPTION),
|
||||
siteName: env(VARS.SITE_NAME),
|
||||
images: [
|
||||
{
|
||||
url: "https://git.fascinated.cc/Fascinated/beatsaber-overlay/media/branch/main/assets/overlay.png",
|
||||
alt: "Site Example",
|
||||
},
|
||||
],
|
||||
}}
|
||||
twitter={{
|
||||
cardType: "summary_large_image",
|
||||
}}
|
||||
/>
|
||||
<NextThemesProvider
|
||||
storageKey="theme"
|
||||
attribute="class"
|
||||
value={{
|
||||
dark: darkTheme,
|
||||
light: lightTheme,
|
||||
}}
|
||||
>
|
||||
<NextUIProvider>
|
||||
<Component {...pageProps} />
|
||||
</NextUIProvider>
|
||||
</NextThemesProvider>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default MyApp;
|
||||
|
Reference in New Issue
Block a user