diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d1c277d..589e155 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: node:20@sha256:735b1ba7e4550c415f98568efbf527e3f75828ac4f10692e490ca78e11d89f6e +image: node:22@sha256:f6b9c31ace05502dd98ef777aaa20464362435dcc5e312b0e213121dcf7d8b95 workflow: rules: @@ -17,7 +17,7 @@ cache: key: ${CI_COMMIT_REF_SLUG} paths: - node_modules/ - policy: pull + - .next/cache/ variables: NEXT_PUBLIC_ENV: "production" diff --git a/Dockerfile b/Dockerfile index 9c017d9..f89869b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # Use lightweight Node.js 20 base image -FROM node:20-alpine as builder +FROM node:20-alpine@sha256:9bef0ef1e268f60627da9ba7d7605e8831d5b56ad07487d24d1aa386336d1944 as builder # Set working directory WORKDIR /app @@ -8,7 +8,7 @@ WORKDIR /app COPY package.json package-lock.json ./ # Install dependencies -RUN npm install +RUN npm ci # Copy entire project COPY . . @@ -17,7 +17,7 @@ COPY . . RUN npm run build # Use a minimal base image for running the app -FROM node:20-alpine +FROM node:20-alpine@sha256:9bef0ef1e268f60627da9ba7d7605e8831d5b56ad07487d24d1aa386336d1944 WORKDIR /app diff --git a/app/favicon.ico b/app/(root)/favicon.ico similarity index 100% rename from app/favicon.ico rename to app/(root)/favicon.ico diff --git a/app/(root)/layout.tsx b/app/(root)/layout.tsx new file mode 100644 index 0000000..4a3ccb9 --- /dev/null +++ b/app/(root)/layout.tsx @@ -0,0 +1,35 @@ +import type {Metadata} from "next"; +import "../globals.css"; + +import Nav from "@/components/Navbar/Nav"; +import Footer from "@/components/Footer/Footer"; +import {ThemeProvider} from "@/components/provider/ThemeProvider"; +import React from "react"; +import {cookies} from "next/headers"; + +export const metadata: Metadata = { + title: "Rhein Software", + description: "Rhein Software Development", +}; + +export default async function RootLayout({ + children, + }: Readonly<{ + children: React.ReactNode; +}>) { + const cookieStore = await cookies(); + const theme = cookieStore.get("theme")?.value === "dark" ? "dark" : "light"; + + return ( + + + + +