fix(docker): repair build
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m5s
All checks were successful
Build and Push Docker Image / build (push) Successful in 1m5s
This commit is contained in:
5
.dockerignore
Normal file
5
.dockerignore
Normal file
@@ -0,0 +1,5 @@
|
||||
node_modules
|
||||
.nuxt
|
||||
.output
|
||||
dist
|
||||
.git
|
||||
@@ -26,5 +26,5 @@ jobs:
|
||||
|
||||
- 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
|
||||
docker build --target dev -t git.pihkaal.me/pihkaal/pihkaal-me:dev .
|
||||
docker push git.pihkaal.me/pihkaal/pihkaal-me:dev
|
||||
|
||||
11
Dockerfile
11
Dockerfile
@@ -1,4 +1,4 @@
|
||||
FROM node:22-alpine AS base
|
||||
FROM node:22-slim AS base
|
||||
RUN corepack enable
|
||||
|
||||
FROM base AS deps
|
||||
@@ -7,6 +7,7 @@ COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
|
||||
RUN pnpm install --frozen-lockfile
|
||||
|
||||
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
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
@@ -17,3 +18,11 @@ WORKDIR /app
|
||||
COPY --from=build /app/.output ./.output
|
||||
EXPOSE 3000
|
||||
CMD ["node", ".output/server/index.mjs"]
|
||||
|
||||
FROM base AS dev
|
||||
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
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
EXPOSE 3000
|
||||
CMD ["pnpm", "dev", "--host", "0.0.0.0"]
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
services:
|
||||
app:
|
||||
image: git.pihkaal.me/pihkaal/pihkaal-me:latest
|
||||
container_name: beta-pihkaal-me
|
||||
image: git.pihkaal.me/pihkaal/pihkaal-me:dev
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- web
|
||||
|
||||
Reference in New Issue
Block a user