diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..651665b --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +node_modules +.git diff --git a/.github/workflows/main-ci.yml b/.github/workflows/main-ci.yml index b16c32c..c7547bf 100644 --- a/.github/workflows/main-ci.yml +++ b/.github/workflows/main-ci.yml @@ -28,3 +28,7 @@ jobs: - name: Build run: npm run build + + - name: Build Docker image + run: | + docker build -t sveltos-dashboard-ui:latest . diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..31190bd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +FROM node:14 + +# Set the working directory in the container +WORKDIR /app + +# Copy package.json and package-lock.json to the working directory +COPY package*.json ./ + +# Install dependencies +RUN npm install + +# Copy the rest of the application code +COPY . . + +# Command to run the application +CMD ["npm", "start"] \ No newline at end of file diff --git a/package.json b/package.json index 77bd14a..cb42a69 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,13 @@ { "name": "sveltos-dashboard", "private": true, - "version": "0.1", + "version": "0.1.0", "type": "module", - "description": "Sveltos User interface d ashboard", + "repository": { + "type": "git", + "url": "https://github.com/projectsveltos/dashboard" + }, + "description": "Sveltos User interface dashboard", "scripts": { "lint": "npx prettier . --write", "dev": "tsc && npx prettier . --write && vite", diff --git a/src/Router.tsx b/src/Router.tsx index 6d29a30..9c180b3 100644 --- a/src/Router.tsx +++ b/src/Router.tsx @@ -30,6 +30,10 @@ export const router = createBrowserRouter( path: "/clusters/:clusterId", element: , }, + { + path: "*", + element: , + }, ], }, { diff --git a/src/components/logo.tsx b/src/components/logo.tsx index 86a1fe9..7536f3f 100644 --- a/src/components/logo.tsx +++ b/src/components/logo.tsx @@ -1,10 +1,10 @@ import { appConfig } from "@/config/app"; -export function Logo() { +export function Logo({className="h-6 w-6"}: {className?: string}) { return ( <> - - - - 404 - - Sorry, we couldn’t find the page you’re looking for. - - - navigate(-1)} - className="px-4 mt-4 inline py-2 text-sm font-medium leading-5 shadow text-white transition-colors duration-150 border border-transparent rounded-lg focus:outline-none focus:shadow-outline-blue bg-blue-600 active:bg-blue-600 hover:bg-blue-700" - > - Back - - - - + + + 404 + Page Not Found + Sorry, the page you are looking for could not be + found. + navigate(-1)} className="mt-4 w-full"> Go Back + ); }
- Sorry, we couldn’t find the page you’re looking for. -
404
Page Not Found
Sorry, the page you are looking for could not be + found.