fix(docker): repair build
All checks were successful
Build and Push Docker Image / build (push) Successful in 2m2s

This commit is contained in:
2026-02-13 14:26:19 +01:00
parent 15f6264bff
commit 14aa423b0e
4 changed files with 18 additions and 1 deletions

5
.dockerignore Normal file
View File

@@ -0,0 +1,5 @@
node_modules
.nuxt
.output
dist
.git

View File

@@ -24,6 +24,16 @@ jobs:
username: ${{ secrets.REGISTRY_USERNAME }} username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }} password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Test runtime
run: |
docker build --target build -t debug-build .
docker run --rm -d -p 3000:3000 --name test-app debug-build sh -c "cd /app && npx nuxt dev --host 0.0.0.0"
sleep 15
curl -s http://localhost:3000 || true
curl -s http://localhost:3000/gallery || true
docker logs test-app
docker stop test-app
- name: Build and push Docker image - name: Build and push Docker image
run: | run: |
docker build -t git.pihkaal.me/pihkaal/pihkaal-me:latest . docker build -t git.pihkaal.me/pihkaal/pihkaal-me:latest .

View File

@@ -1,4 +1,4 @@
FROM node:22-alpine AS base FROM node:22-slim AS base
RUN corepack enable RUN corepack enable
FROM base AS deps FROM base AS deps
@@ -7,6 +7,7 @@ COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
RUN pnpm install --frozen-lockfile RUN pnpm install --frozen-lockfile
FROM base AS build FROM base AS build
RUN apt-get update && apt-get install -y --no-install-recommends imagemagick && rm -rf /var/lib/apt/lists/* && ln -s /usr/bin/convert /usr/local/bin/magick
WORKDIR /app WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules COPY --from=deps /app/node_modules ./node_modules
COPY . . COPY . .

View File

@@ -1,5 +1,6 @@
services: services:
app: app:
container_name: beta-pihkaal-me
image: git.pihkaal.me/pihkaal/pihkaal-me:latest image: git.pihkaal.me/pihkaal/pihkaal-me:latest
restart: unless-stopped restart: unless-stopped
networks: networks: