feat: add Dockerfile and deployment configuration; update metadata and project descriptions
Some checks failed
Build and Deploy Gabriel Kaszewski Portfolio / build-and-deploy-local (push) Failing after 10s
Some checks failed
Build and Deploy Gabriel Kaszewski Portfolio / build-and-deploy-local (push) Failing after 10s
This commit is contained in:
23
.gitea/workflows/deploy.yml
Normal file
23
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
name: Build and Deploy Gabriel Kaszewski Portfolio
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-deploy-local:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Rebuild and Deploy with Docker Compose
|
||||||
|
run: |
|
||||||
|
docker build --target release -t local/gabriel-portfolio:latest .
|
||||||
|
docker compose up -d
|
||||||
|
|
||||||
|
# Clean up any old, unused images to save disk space
|
||||||
|
docker image prune -f
|
31
Dockerfile
Normal file
31
Dockerfile
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
FROM oven/bun:1 AS base
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
FROM base AS install
|
||||||
|
RUN mkdir -p /temp/dev
|
||||||
|
COPY package.json bun.lock /temp/dev/
|
||||||
|
RUN cd /temp/dev && bun install --frozen-lockfile
|
||||||
|
|
||||||
|
RUN mkdir -p /temp/prod
|
||||||
|
COPY package.json bun.lock /temp/prod/
|
||||||
|
RUN cd /temp/prod && bun install --frozen-lockfile --production
|
||||||
|
|
||||||
|
FROM base AS prerelease
|
||||||
|
COPY --from=install /temp/dev/node_modules node_modules
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
ENV NODE_ENV=production
|
||||||
|
RUN bun run build
|
||||||
|
|
||||||
|
FROM base AS release
|
||||||
|
|
||||||
|
COPY --from=prerelease /app/public ./public
|
||||||
|
COPY --from=prerelease /app/.next ./.next
|
||||||
|
COPY --from=prerelease /app/node_modules ./node_modules
|
||||||
|
COPY --from=prerelease /app/package.json ./package.json
|
||||||
|
|
||||||
|
USER bun
|
||||||
|
EXPOSE 3000/tcp
|
||||||
|
|
||||||
|
CMD ["bun", "run", "start"]
|
||||||
|
|
@@ -42,7 +42,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
/* background: var(--background); */
|
|
||||||
background-image: url("/images/background.avif");
|
background-image: url("/images/background.avif");
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
background-attachment: fixed;
|
background-attachment: fixed;
|
||||||
|
@@ -3,7 +3,6 @@ import { Geist, Geist_Mono } from "next/font/google";
|
|||||||
import "./globals.css";
|
import "./globals.css";
|
||||||
import Navbar from "@/components/navbar";
|
import Navbar from "@/components/navbar";
|
||||||
import Footer from "@/components/footer";
|
import Footer from "@/components/footer";
|
||||||
import Image from "next/image";
|
|
||||||
|
|
||||||
const geistSans = Geist({
|
const geistSans = Geist({
|
||||||
variable: "--font-geist-sans",
|
variable: "--font-geist-sans",
|
||||||
@@ -16,8 +15,48 @@ const geistMono = Geist_Mono({
|
|||||||
});
|
});
|
||||||
|
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
title: "Gabriel Kaszewski",
|
title: {
|
||||||
description: "Welcome to my portfolio",
|
default: "Gabriel Kaszewski | Full-Stack Developer",
|
||||||
|
template: "%s | Gabriel Kaszewski",
|
||||||
|
},
|
||||||
|
description:
|
||||||
|
"The portfolio of Gabriel Kaszewski, a self-taught full-stack developer specializing in Rust, Python, and modern web technologies.",
|
||||||
|
keywords: [
|
||||||
|
"Gabriel Kaszewski",
|
||||||
|
"Full-Stack Developer",
|
||||||
|
"Rust Developer",
|
||||||
|
"Python Developer",
|
||||||
|
"Next.js",
|
||||||
|
"Portfolio",
|
||||||
|
],
|
||||||
|
openGraph: {
|
||||||
|
title: "Gabriel Kaszewski | Full-Stack Developer",
|
||||||
|
description:
|
||||||
|
"Welcome to my portfolio. Discover my projects, skills, and journey.",
|
||||||
|
url: "https://gabrielkaszewski.dev",
|
||||||
|
siteName: "Gabriel Kaszewski's Portfolio",
|
||||||
|
locale: "en_US",
|
||||||
|
type: "website",
|
||||||
|
},
|
||||||
|
|
||||||
|
twitter: {
|
||||||
|
card: "summary_large_image",
|
||||||
|
title: "Gabriel Kaszewski | Full-Stack Developer",
|
||||||
|
description:
|
||||||
|
"Explore my work as a full-stack developer, from web apps to game development.",
|
||||||
|
},
|
||||||
|
|
||||||
|
robots: {
|
||||||
|
index: true,
|
||||||
|
follow: true,
|
||||||
|
googleBot: {
|
||||||
|
index: true,
|
||||||
|
follow: true,
|
||||||
|
"max-video-preview": -1,
|
||||||
|
"max-image-preview": "large",
|
||||||
|
"max-snippet": -1,
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function RootLayout({
|
export default function RootLayout({
|
||||||
@@ -25,11 +64,38 @@ export default function RootLayout({
|
|||||||
}: Readonly<{
|
}: Readonly<{
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
}>) {
|
}>) {
|
||||||
|
const jsonLd = {
|
||||||
|
"@context": "https://schema.org",
|
||||||
|
"@type": "Person",
|
||||||
|
name: "Gabriel Kaszewski",
|
||||||
|
url: "https://gabrielkaszewski.dev",
|
||||||
|
sameAs: [
|
||||||
|
"https://github.com/GKaszewski",
|
||||||
|
"https://www.linkedin.com/in/gabriel-kaszewski-5344b3183",
|
||||||
|
],
|
||||||
|
jobTitle: "Full-Stack Developer",
|
||||||
|
alumniOf: "University of Gdańsk",
|
||||||
|
knowsAbout: [
|
||||||
|
"Rust",
|
||||||
|
"Python",
|
||||||
|
"Next.js",
|
||||||
|
"React",
|
||||||
|
"Tailwind CSS",
|
||||||
|
"Game Development",
|
||||||
|
"Web Development",
|
||||||
|
],
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<body
|
<body
|
||||||
className={`${geistSans.variable} ${geistMono.variable} antialiased relative`}
|
className={`${geistSans.variable} ${geistMono.variable} antialiased relative`}
|
||||||
>
|
>
|
||||||
|
<script
|
||||||
|
type="application/ld+json"
|
||||||
|
dangerouslySetInnerHTML={{ __html: JSON.stringify(jsonLd) }}
|
||||||
|
/>
|
||||||
|
|
||||||
<Navbar />
|
<Navbar />
|
||||||
{children}
|
{children}
|
||||||
<Footer />
|
<Footer />
|
||||||
|
@@ -36,6 +36,21 @@ export async function generateMetadata({
|
|||||||
return {
|
return {
|
||||||
title: `${project.name} | Gabriel Kaszewski`,
|
title: `${project.name} | Gabriel Kaszewski`,
|
||||||
description: project.short_description,
|
description: project.short_description,
|
||||||
|
openGraph: {
|
||||||
|
title: project.name,
|
||||||
|
description: project.short_description,
|
||||||
|
images:
|
||||||
|
project.thumbnails && project.thumbnails.length > 0
|
||||||
|
? [
|
||||||
|
{
|
||||||
|
url: project.thumbnails[0],
|
||||||
|
width: 800,
|
||||||
|
height: 600,
|
||||||
|
alt: project.name,
|
||||||
|
},
|
||||||
|
]
|
||||||
|
: undefined,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -4,7 +4,8 @@ import { Metadata } from "next";
|
|||||||
|
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
title: "My Projects | Gabriel Kaszewski",
|
title: "My Projects | Gabriel Kaszewski",
|
||||||
description: "A showcase of projects by Gabriel Kaszewski.",
|
description:
|
||||||
|
"A showcase of my work, including web applications, games, and developer tools built with Rust, Next.js, and more.",
|
||||||
};
|
};
|
||||||
|
|
||||||
const ProjectsPage = () => {
|
const ProjectsPage = () => {
|
||||||
|
15
compose.yml
Normal file
15
compose.yml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
services:
|
||||||
|
gabrielkaszewski:
|
||||||
|
image: local/gabriel-portfolio:latest
|
||||||
|
container_name: gabrielkaszewski
|
||||||
|
restart: unless-stopped
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.gabrielkaszewski.rule=Host(`gabrielkaszewski.dev`)"
|
||||||
|
- "traefik.http.routers.gabrielkaszewski.entrypoints=websecure"
|
||||||
|
- "traefik.http.routers.gabrielkaszewski.tls.certresolver=letsencrypt"
|
||||||
|
networks:
|
||||||
|
- traefik
|
||||||
|
networks:
|
||||||
|
traefik:
|
||||||
|
external: true
|
Binary file not shown.
Before Width: | Height: | Size: 264 KiB |
Reference in New Issue
Block a user