feat: docker build and gitea workflow

This commit is contained in:
2026-02-13 12:16:33 +01:00
parent 0c34825482
commit 9837b5ccdc
5 changed files with 68 additions and 109 deletions

View File

@@ -0,0 +1,30 @@
name: Build and Push Docker Image
on:
push:
branches:
- beta
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: git.pihkaal.me
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push Docker image
run: |
docker build -t git.pihkaal.me/pihkaal/pihkaal-me:latest .
docker push git.pihkaal.me/pihkaal/pihkaal-me:latest

View File

@@ -1,34 +0,0 @@
name: CI
on:
push:
branches: [main, 3d-nds]
pull_request:
branches: [main, 3d-nds]
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: pnpm setup
uses: pnpm/action-setup@v4
with:
version: 10
- name: node setup
uses: actions/setup-node@v4
with:
node-version: 25
cache: "pnpm"
- name: install
run: pnpm install --frozen-lockfile
- name: lint
run: pnpm lint
- name: build
run: pnpm build

19
Dockerfile Normal file
View File

@@ -0,0 +1,19 @@
FROM node:22-alpine AS base
RUN corepack enable
FROM base AS deps
WORKDIR /app
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
FROM base AS build
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN pnpm build
FROM base AS runtime
WORKDIR /app
COPY --from=build /app/.output ./.output
EXPOSE 3000
CMD ["node", ".output/server/index.mjs"]

View File

@@ -1,75 +1 @@
# Nuxt Minimal Starter # beta.pihkaal.me
Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
## Setup
Make sure to install dependencies:
```bash
# npm
npm install
# pnpm
pnpm install
# yarn
yarn install
# bun
bun install
```
## Development Server
Start the development server on `http://localhost:3000`:
```bash
# npm
npm run dev
# pnpm
pnpm dev
# yarn
yarn dev
# bun
bun run dev
```
## Production
Build the application for production:
```bash
# npm
npm run build
# pnpm
pnpm build
# yarn
yarn build
# bun
bun run build
```
Locally preview production build:
```bash
# npm
npm run preview
# pnpm
pnpm preview
# yarn
yarn preview
# bun
bun run preview
```
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.

18
docker-compose.yml Normal file
View File

@@ -0,0 +1,18 @@
services:
app:
image: git.pihkaal.me/pihkaal/pihkaal-me:latest
restart: unless-stopped
networks:
- web
labels:
- "traefik.enable=true"
- "traefik.http.routers.pihkaal-me.rule=Host(`beta.pihkaal.me`)"
- "traefik.http.routers.pihkaal-me.middlewares=auth"
- "traefik.http.routers.pihkaal-me.tls=true"
- "traefik.http.routers.pihkaal-me.tls.certResolver=myresolver"
- "traefik.http.services.pihkaal-me.loadbalancer.server.port=3000"
- "traefik.http.middlewares.auth.basicauth.users=${BASIC_AUTH_USERS}"
networks:
web:
external: true