Big Version Change & Move to Gitea
All checks were successful
Build Check / deploy-coolify (push) Successful in 7s
Build Check / build (push) Successful in 10m23s
Build Check / push-image (push) Successful in 54s

This commit is contained in:
Space-Banane
2026-05-29 20:38:27 +02:00
parent 6cb077afe4
commit bb3e355ef8
7 changed files with 149 additions and 41 deletions

10
.dockerignore Normal file
View File

@@ -0,0 +1,10 @@
node_modules
.next
.git
.github
vite.log
vite.err.log
Dockerfile
docker-compose.yml
npm-debug.log
pnpm-debug.log

View File

@@ -28,3 +28,54 @@ jobs:
- name: Build Next.js app - name: Build Next.js app
run: pnpm run build run: pnpm run build
push-image:
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: checkout
uses: actions/checkout@v4
- name: setup buildx
uses: docker/setup-buildx-action@v3
- name: log in to harbor
uses: docker/login-action@v3
with:
registry: registry.reversed.dev
username: ${{ secrets.HARBOR_USERNAME }}
password: ${{ secrets.HARBOR_PASSWORD }}
- name: build and push image
uses: docker/build-push-action@v6
with:
context: .
push: true
provenance: false
sbom: false
tags: |
registry.reversed.dev/my-portfolio/my-portfolio:latest
registry.reversed.dev/my-portfolio/my-portfolio:${{ github.sha }}
deploy-coolify:
needs: push-image
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: wait 5 seconds before redeploy
run: sleep 5
- name: Redeploy Coolify
run: |
response_file="$(mktemp)"
http_code="$(curl -sS -o "$response_file" -w "%{http_code}" -X GET "${{ secrets.COOLIFY_WEBHOOK }}" \
-H "Authorization: Bearer ${{ secrets.COOLIFY_TOKEN }}")"
echo "Coolify webhook HTTP status: $http_code"
echo "Coolify webhook response body:"
cat "$response_file"
if [ "$http_code" -lt 200 ] || [ "$http_code" -ge 300 ]; then
echo "Redeploy request failed with non-2xx status."
exit 1
fi

32
Dockerfile Normal file
View File

@@ -0,0 +1,32 @@
FROM node:24-alpine AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
FROM base AS deps
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN pnpm build
FROM node:24-alpine AS runner
WORKDIR /app
ENV NODE_ENV=production
ENV PORT=3000
ENV HOSTNAME=0.0.0.0
RUN addgroup -S nodejs && adduser -S nextjs -G nodejs
COPY --from=builder /app/public ./public
COPY --from=builder /app/.next/standalone ./
COPY --from=builder /app/.next/static ./.next/static
USER nextjs
EXPOSE 3000
CMD ["node", "server.js"]

View File

@@ -1,36 +1,64 @@
This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app). # My Portfolio
## Getting Started Personal portfolio built with Next.js, React, TypeScript, and Tailwind CSS.
First, run the development server: ## What It Includes
- Hero section with typing intro
- Work experience and skills sections
- Uptime and activity panels
- Project and mini-project showcases
- Contact page and admin page
## Development
Install dependencies:
```bash ```bash
npm run dev pnpm install
# or
yarn dev
# or
pnpm dev
# or
bun dev
``` ```
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. Run the development server:
You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. ```bash
pnpm dev
```
This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel. Open [http://localhost:3000](http://localhost:3000) in your browser.
## Learn More ## Production Build
To learn more about Next.js, take a look at the following resources: Create a production build:
- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. ```bash
- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. pnpm build
```
You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! Start the production server locally:
## Deploy on Vercel ```bash
pnpm start
```
The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. ## Docker
Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. This project includes a standalone Docker image setup.
Build the image:
```bash
docker build -t my-portfolio:latest .
```
Run with Docker Compose:
```bash
docker compose up --build
```
The app will be available on port `6756` via `docker-compose.yml`.
## Notes
- `next.config.ts` uses `output: "standalone"` so the Docker image can ship a minimal runtime.
- The activity graph on the home page is loaded from a remote SVG source.

View File

@@ -1,16 +1,9 @@
services: services:
app: app:
image: node:24 build:
working_dir: /app context: .
volumes: dockerfile: Dockerfile
- .:/app image: my-portfolio:latest
restart: always restart: always
ports: ports:
- "6756:3000" - "6756:3000"
command: >
sh -c "
npm i -g pnpm &&
pnpm install &&
pnpm build &&
pnpm start
"

View File

@@ -1,7 +1,7 @@
import type { NextConfig } from "next"; import type { NextConfig } from "next";
const nextConfig: NextConfig = { const nextConfig: NextConfig = {
/* config options here */ output: "standalone",
}; };
export default nextConfig; export default nextConfig;

View File

@@ -16,13 +16,7 @@ export function Activity() {
</div> </div>
<div className="max-w-5xl mx-auto rounded-3xl border border-white/10 bg-white/5 backdrop-blur-sm p-4 md:p-6 shadow-[0_20px_80px_rgba(0,0,0,0.35)]"> <div className="max-w-5xl mx-auto rounded-3xl border border-white/10 bg-white/5 backdrop-blur-sm p-4 md:p-6 shadow-[0_20px_80px_rgba(0,0,0,0.35)]">
<a <div className="overflow-hidden rounded-2xl border border-white/10 bg-[#0a0a12]">
href={activitySvg}
target="_blank"
rel="noreferrer"
className="block overflow-hidden rounded-2xl border border-white/10 bg-[#0a0a12] transition-transform duration-300 hover:scale-[1.01] hover:border-blue-400/40"
aria-label="Open Git activity SVG in a new tab"
>
<img <img
src={activitySvg} src={activitySvg}
alt="Git activity graph" alt="Git activity graph"
@@ -30,7 +24,7 @@ export function Activity() {
loading="lazy" loading="lazy"
referrerPolicy="no-referrer" referrerPolicy="no-referrer"
/> />
</a> </div>
</div> </div>
</section> </section>
); );