Skip to content

Commit 54c5c8c

Browse files
committed
Add dockerfile and build.
1 parent c575812 commit 54c5c8c

3 files changed

Lines changed: 66 additions & 0 deletions

File tree

‎.dockerignore‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
.git/
2+
.github/
3+
4+
node_modules/
5+
dist/
6+
7+
.dockerignore
8+
.gitignore
9+
10+
Dockerfile
11+
12+
LICENSE
13+
14+
*.node_modules
15+
16+
renovate.json

‎.github/workflows/build-docker.yml‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Docker Multi-Architecture Build
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- "**.md"
7+
branches:
8+
- main
9+
10+
jobs:
11+
build-docker-image:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Set up QEMU
16+
uses: docker/setup-qemu-action@v3
17+
with:
18+
platforms: all
19+
- name: Set up Docker BuildX
20+
uses: docker/setup-buildx-action@v3
21+
- name: Login to DockerHub
22+
uses: docker/login-action@v3
23+
with:
24+
username: ${{ secrets.DOCKER_USERNAME }}
25+
password: ${{ secrets.DOCKER_PASSWORD }}
26+
- name: Build and push
27+
uses: docker/build-push-action@v6
28+
with:
29+
context: .
30+
file: ./Dockerfile
31+
platforms: linux/amd64,linux/arm64
32+
push: true
33+
tags: 1337kavin/bg-helper-server:latest
34+
cache-from: type=gha
35+
cache-to: type=gha,mode=max

‎Dockerfile‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
FROM oven/bun:latest AS builder
2+
3+
WORKDIR /app/
4+
5+
COPY package.json bun.lockb ./
6+
7+
RUN bun install
8+
9+
COPY . .
10+
11+
RUN bun run build
12+
13+
EXPOSE 3000
14+
15+
CMD ["bun", "dist/index.js"]

0 commit comments

Comments
 (0)