Skip to content

Commit

Permalink
fix: Another attempt to fix automatic github actions docker builds
Browse files Browse the repository at this point in the history
  • Loading branch information
RARgames committed Dec 29, 2023
1 parent 2f2ecce commit 0f38fb8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 79 deletions.
19 changes: 12 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
FROM ghcr.io/rargames/4gaboards:base-latest as server-dependencies
FROM node:20-alpine as server-dependencies

WORKDIR /app

COPY server/package.json server/package-lock.json .

RUN npm install npm@latest --global
RUN npm clean-install --omit=dev --fetch-timeout=60000
RUN npm install pnpm --global
RUN pnpm import
RUN pnpm install --prod

FROM node:lts AS client

Expand All @@ -14,19 +16,22 @@ WORKDIR /app
COPY client/package.json client/package-lock.json .

RUN npm install npm@latest --global
RUN npm clean-install --omit=dev --fetch-timeout=60000
RUN npm install pnpm --global
RUN pnpm import
RUN pnpm install --prod

COPY client .
RUN DISABLE_ESLINT_PLUGIN=true npm run build

FROM ghcr.io/rargames/4gaboards:base-latest
FROM node:20-alpine

RUN apk del vips-dependencies --purge
RUN apk -U upgrade
RUN apk add bash --no-cache

USER node
WORKDIR /app

COPY --chown=node:node --chmod=775 start.sh .
COPY --chown=node:node start.sh .
COPY --chown=node:node server .

RUN mv .env.sample .env
Expand All @@ -42,4 +47,4 @@ VOLUME /app/private/attachments

EXPOSE 1337

CMD ["./start.sh"]
CMD ["./start.sh"]
27 changes: 0 additions & 27 deletions Dockerfile.base

This file was deleted.

45 changes: 0 additions & 45 deletions Dockerfile.local

This file was deleted.

0 comments on commit 0f38fb8

Please sign in to comment.