Compare commits

..

6 Commits
dev ... main

Author SHA1 Message Date
eb70cc728d Merge pull request 'updated ci/cd pipeline' (#10) from dev into main
Some checks failed
Deploy Next.js App / deploy (push) Failing after 0s
Reviewed-on: #10
2025-03-17 15:03:18 +00:00
93d94616b5 Merge pull request 'fixed docker compose traefik network' (#9) from dev into main
All checks were successful
Deploy Next.js App / deploy (push) Successful in 0s
Reviewed-on: #9
2025-03-17 14:27:54 +00:00
bbd466e050 Merge pull request 'updated docker files' (#8) from dev into main
All checks were successful
Deploy Next.js App / deploy (push) Successful in 0s
Reviewed-on: #8
2025-03-17 14:21:33 +00:00
247ada2b0e Merge pull request 'added traefik labels' (#7) from dev into main
All checks were successful
Deploy Next.js App / deploy (push) Successful in 0s
Reviewed-on: #7
2025-03-16 15:07:48 +00:00
85f6efc82c Merge pull request 'CI/CD pipepline' (#6) from dev into main
Some checks failed
Deploy Next.js App / deploy (push) Failing after 0s
Reviewed-on: #6
2025-03-16 14:53:50 +00:00
f8a10a8ff0 Merge pull request 'dev' (#5) from dev into main
Some checks failed
Deploy Next.js App / deploy (push) Failing after 0s
Reviewed-on: #5
2025-03-16 14:42:27 +00:00
7 changed files with 57 additions and 72 deletions

15
deploy.sh Normal file
View File

@ -0,0 +1,15 @@
#!/bin/bash
set -e
if [ -z "$1" ]; then
echo "Usage: $0 <project_path>"
exit 1
fi
PROJECT_PATH=$1
echo "Deploying project..."
cd "$PROJECT_PATH" || { echo "Directory not found: $PROJECT_PATH"; exit 1; }
git pull origin main
docker-compose up -d --build
echo "Deployment finished!"

24
docker-compose.yml Normal file
View File

@ -0,0 +1,24 @@
version: "3.8"
services:
nextjs:
build: .
deploy:
update_config:
parallelism: 1
delay: 5s
order: start-first
container_name: pablo.shortman.me
restart: always
labels:
- "traefik.enable=true"
- "traefik.http.routers.pablo-shortman-me.rule=Host(`pablo.shortman.me`)"
- "traefik.http.routers.pablo-shortman-me.entrypoints=websecure"
- "traefik.http.services.pablo-shortman-me.loadbalancer.server.port=3000"
- "traefik.http.routers.pablo-shortman-me.tls.certresolver=myresolver"
expose:
- "3000"
networks:
- webproxy
networks:
webproxy:
external: true

View File

@ -2,11 +2,7 @@ import React from "react";
import Contact from "@/components/setions/contact";
function ContactPage() {
return (
<div className="pt-12">
<Contact />
</div>
);
return <Contact />;
}
export default ContactPage;

View File

@ -24,7 +24,6 @@ import {
SelectValue,
} from "@/components/ui/select";
import { cn } from "@/lib/utils";
import { sendDiscordNotification } from "@/lib/actions";
const formSchema = z.object({
name: z.string().min(2).max(50),
@ -40,16 +39,10 @@ function ContactForm() {
});
// 2. Define a submit handler.
async function onSubmit({
email,
message,
name,
budget,
}: z.infer<typeof formSchema>) {
await sendDiscordNotification(
`📬 **New Lead Submission**\n*Source*: pablo.shortman.me \n**Name**: ${name}\n**Email**: ${email}\n**Message**: ${message} \n**Budget**: ${budget} $`
);
form.reset();
function onSubmit(values: z.infer<typeof formSchema>) {
// Do something with the form values.
// ✅ This will be type-safe and validated.
console.log(values);
}
return (
@ -105,8 +98,8 @@ function ContactForm() {
<SelectValue placeholder="Select your Budget" />
</SelectTrigger>
<SelectContent>
<SelectItem value="< €2k">{"less then $1k"}</SelectItem>
<SelectItem value="> €4k">{"more then $3k"}</SelectItem>
<SelectItem value="< €2k">{"less then $2k"}</SelectItem>
<SelectItem value="> €4k">{"more then $4k"}</SelectItem>
<SelectItem value="> €6k">{"more then $6k"}</SelectItem>
</SelectContent>
</Select>

View File

@ -1,16 +1,10 @@
import Link from "next/link";
import React from "react";
export type TechIcon = "ts" | "next" | "react" | "tailwind" | "PostgreSQL";
const tech: {
label: string;
link: string;
Logo: (props: any) => JSX.Element;
}[] = [
const tech: { label: string; Logo: (props: any) => JSX.Element }[] = [
{
label: "Tailwind CSS",
link: "https://tailwindcss.com/",
Logo: (props: any) => (
<svg
{...props}
@ -51,7 +45,6 @@ const tech: {
},
{
label: "Typescript",
link: "https://www.typescriptlang.org/",
Logo: (props: any) => (
<svg
{...props}
@ -79,7 +72,6 @@ const tech: {
},
{
label: "Next JS",
link: "https://nextjs.org/",
Logo: (props: any) => (
<svg
{...props}
@ -107,8 +99,6 @@ const tech: {
},
{
label: "Drizzle ORM",
link: "https://orm.drizzle.team/",
Logo: (props: any) => (
<svg
{...props}
@ -138,7 +128,6 @@ const tech: {
{
label: "PostgreSQL",
link: "https://www.postgresql.org/",
Logo: (props: any) => (
<svg
{...props}
@ -168,7 +157,6 @@ const tech: {
{
label: "Figma",
link: "https://www.figma.com",
Logo: (props: any) => (
<svg
{...props}
@ -196,7 +184,6 @@ const tech: {
},
{
label: "Github",
link: "https://github.com/",
Logo: (props: any) => (
<svg
{...props}
@ -228,20 +215,18 @@ function Tech() {
return (
<div className="py-12 lg:py-20 container relative space-y-8">
<h3 className="text-sm font-mono text-muted-foreground text-center">
most liked <span className="text-foreground">technologies</span> and{" "}
<span className="text-foreground">tools</span>
most liked{" "}
<span className="underline text-foreground">technologies</span> and{" "}
<span className="underline text-foreground">tools</span>
</h3>
<ul className="flex w-full items-center justify-center gap-2 md:gap-4 lg:gap-8 flex-wrap">
{tech.map(({ Logo, label, link }, idx) => (
<li key={idx}>
<Link
href={link}
target="_blank"
{tech.map(({ Logo, label }, idx) => (
<li
className="flex items-center gap-2 py-2 px-6 rounded-md bg-muted"
key={idx}
>
<Logo className="size-6" />
<span>{label}</span>
</Link>
</li>
))}
</ul>

View File

@ -1,13 +0,0 @@
"use server";
export async function sendDiscordNotification(message: string) {
const webhookUrl = process.env.DISCORD_WEBHOOK_URL;
await fetch(webhookUrl!, {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
content: message,
}),
});
}

View File

@ -1,15 +0,0 @@
labels:
- "traefik.enable=true"
- "traefik.http.routers.logipedia.rule=Host(`logipedia.shortman.me`)"
- "traefik.http.routers.logipedia.entrypoints=websecure"
- "traefik.http.routers.logipedia.tls.certresolver=myresolver"
networks:
- logipedia_network
- webproxy
labels:
- "traefik.enable=true"
- "traefik.http.routers.pablo-shortman-me.rule=Host(`pablo.shortman.me`)"
- "traefik.http.routers.pablo-shortman-me.entrypoints=websecure"
- "traefik.http.routers.pablo-shortman-me.tls.certresolver=myresolver"
networks:
- webproxy