mirror of
https://github.com/timmypidashev/web.git
synced 2026-04-14 02:53:51 +00:00
Dockerfile, tailwind
This commit is contained in:
28
src/web/Dockerfile.dev
Normal file
28
src/web/Dockerfile.dev
Normal file
@@ -0,0 +1,28 @@
|
||||
# Use an official Node.js runtime as a base image
|
||||
FROM node:20.10-alpine
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy "package.json" and "package-lock.json" before other files
|
||||
# Utilise Docker cache to save re-installing dependencies if unchanged
|
||||
COPY ./package*.json .
|
||||
|
||||
# Install dependencies
|
||||
RUN npm install
|
||||
|
||||
# Change ownership to the non-root user
|
||||
RUN chown -R node:node /app
|
||||
|
||||
# Copy all files
|
||||
COPY . .
|
||||
|
||||
# Expose the listening port
|
||||
EXPOSE 3000
|
||||
|
||||
# Run container as non-root (unprivileged) user
|
||||
# The "node" user is provided in the Node.js Alpine base image
|
||||
USER node
|
||||
|
||||
# Launch app with PM2
|
||||
CMD [ "npm", "run", "dev" ]
|
||||
783
src/web/package-lock.json
generated
783
src/web/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -14,6 +14,9 @@
|
||||
"next": "14.1.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"autoprefixer": "^10.0.1",
|
||||
"postcss": "^8",
|
||||
"tailwindcss": "^3.3.0",
|
||||
"eslint": "^8",
|
||||
"eslint-config-next": "14.1.3"
|
||||
}
|
||||
|
||||
6
src/web/postcss.config.js
Normal file
6
src/web/postcss.config.js
Normal file
@@ -0,0 +1,6 @@
|
||||
module.exports = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
},
|
||||
};
|
||||
@@ -1,5 +1,6 @@
|
||||
// Imports
|
||||
import Navbar from "@/components/navbar";
|
||||
import '@/styles/tailwind.css';
|
||||
import NavBar from "@/components/navbar";
|
||||
import Footer from "@/components/footer";
|
||||
|
||||
// Metadata
|
||||
@@ -11,10 +12,12 @@ export const metadata = {
|
||||
// Exports
|
||||
export default function Layout({children}) {
|
||||
return (
|
||||
<>
|
||||
<Navbar/>
|
||||
<html lang="en">
|
||||
<body>
|
||||
<NavBar/>
|
||||
<main>{children}</main>
|
||||
<Footer/>
|
||||
</>
|
||||
</body>
|
||||
</html>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,38 @@
|
||||
const Navbar = () => {
|
||||
"use client";
|
||||
|
||||
import Link from "next/link";
|
||||
import { usePathname } from "next/navigation";
|
||||
|
||||
const navItems= [
|
||||
{
|
||||
path: "/",
|
||||
name: "Home"
|
||||
},
|
||||
{
|
||||
path: "/projects",
|
||||
name: "Projects"
|
||||
},
|
||||
{
|
||||
path: "/resume",
|
||||
name: "Resume"
|
||||
},
|
||||
{
|
||||
path: "/blog",
|
||||
name: "Blog"
|
||||
},
|
||||
{
|
||||
path: "/shop",
|
||||
name: "Shop"
|
||||
}
|
||||
]
|
||||
|
||||
const NavBar = () => {
|
||||
|
||||
return (
|
||||
<h1>navbar</h1>
|
||||
<div className="text-3xl font-bold text-gray-800">
|
||||
Navbar
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default Navbar;
|
||||
export default NavBar;
|
||||
|
||||
3
src/web/src/styles/tailwind.css
Normal file
3
src/web/src/styles/tailwind.css
Normal file
@@ -0,0 +1,3 @@
|
||||
@import 'tailwindcss/base';
|
||||
@import 'tailwindcss/components';
|
||||
@import 'tailwindcss/utilities';
|
||||
13
src/web/tailwind.config.js
Normal file
13
src/web/tailwind.config.js
Normal file
@@ -0,0 +1,13 @@
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
content: [
|
||||
"./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
|
||||
"./src/components/**/*.{js,ts,jsx,tsx,mdx}",
|
||||
"./src/app/**/*.{js,ts,jsx,tsx,mdx}",
|
||||
"./src/**/*.{js,ts,jsx,tsx,mdx}"
|
||||
],
|
||||
theme: {
|
||||
extend: {},
|
||||
},
|
||||
plugins: [],
|
||||
};
|
||||
Reference in New Issue
Block a user