Skip to content

Commit

Permalink
Add dockerfile and build.
Browse files Browse the repository at this point in the history
  • Loading branch information
FireMasterK committed Dec 12, 2024
1 parent c575812 commit 54c5c8c
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.git/
.github/

node_modules/
dist/

.dockerignore
.gitignore

Dockerfile

LICENSE

*.node_modules

renovate.json
35 changes: 35 additions & 0 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Docker Multi-Architecture Build

on:
push:
paths-ignore:
- "**.md"
branches:
- main

jobs:
build-docker-image:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Set up Docker BuildX
uses: docker/setup-buildx-action@v3
- name: Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: 1337kavin/bg-helper-server:latest
cache-from: type=gha
cache-to: type=gha,mode=max
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM oven/bun:latest AS builder

WORKDIR /app/

COPY package.json bun.lockb ./

RUN bun install

COPY . .

RUN bun run build

EXPOSE 3000

CMD ["bun", "dist/index.js"]

0 comments on commit 54c5c8c

Please sign in to comment.