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