Skip to content

Commit

Permalink
try something out with docker uwu πŸ‘‰πŸ‘ˆ
Browse files Browse the repository at this point in the history
should ideally work πŸ₯Ί
  • Loading branch information
pixelcmtd committed Feb 2, 2024
1 parent 3917ac8 commit 6aa7fbf
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
28 changes: 28 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build and publish new containers

on:
push:
branches: [daddy, procens]

jobs:
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- run: npm ci
- run: npm run test
- run: npm run build
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- uses: docker/build-push-action@v5
with:
push: true
platforms: linux/amd64,linux/arm64,linux/arm32,linux/ppc64le,linux/s390x
tags: chrissx/kinkcheck.top:${{ github.ref_name }}
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: lts/*
- run: npm install
- run: npm ci
- run: npm run test
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM node:lts-alpine
ENV NODE_ENV production
WORKDIR /usr/src/app

# requires buildx/buildkit, which not everything has *yet*
RUN --mount=type=bind,source=package.json,target=package.json \
--mount=type=bind,source=package-lock.json,target=package-lock.json \
--mount=type=cache,target=/root/.npm \
npm ci --omit=dev
#COPY package.json .
#COPY package-lock.json .
#RUN npm ci --omit=dev
#RUN rm package.json package-lock.json

USER node
COPY dist .
EXPOSE 4321
CMD node server/entry.mjs

0 comments on commit 6aa7fbf

Please sign in to comment.