feat: docker image and automatic building

This commit is contained in:
Pihkaal
2025-05-07 19:03:41 +02:00
parent 416d7675f2
commit dd20f25580
4 changed files with 50 additions and 0 deletions

2
.dockerignore Normal file
View File

@@ -0,0 +1,2 @@
node_modules
.env

28
.github/workflows/docker-build.yml vendored Normal file
View File

@@ -0,0 +1,28 @@
name: Build and Push Docker Image
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push Docker image
run: |
docker build -t pihkaal/wov-quest-result:latest .
docker push pihkaal/wov-quest-result:latest

10
Dockerfile Normal file
View File

@@ -0,0 +1,10 @@
FROM oven/bun:latest
WORKDIR /app
COPY package.json bun.lockb ./
RUN bun install
COPY . .
CMD ["bun", "."]

10
docker-compose.yml Normal file
View File

@@ -0,0 +1,10 @@
services:
wov-quest-result:
image: pihkaal/wov-quest-result:latest
networks:
- web
restart: always
networks:
web:
external: true