This commit is contained in:
parent
66744ddd10
commit
4525442251
3 changed files with 67 additions and 0 deletions
36
.forgejo/workflows/release.yml
Normal file
36
.forgejo/workflows/release.yml
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
name: Build & Release Bun App
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
runs-on: docker
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install Bun
|
||||||
|
run: |
|
||||||
|
curl -fsSL https://bun.sh/install | bash
|
||||||
|
export BUN_INSTALL="$HOME/.bun"
|
||||||
|
export PATH="$BUN_INSTALL/bin:$PATH"
|
||||||
|
bun install
|
||||||
|
|
||||||
|
- name: Build Bun app
|
||||||
|
run: |
|
||||||
|
export BUN_INSTALL="$HOME/.bun"
|
||||||
|
export PATH="$BUN_INSTALL/bin:$PATH"
|
||||||
|
bun run build
|
||||||
|
|
||||||
|
- name: Archive dist folder
|
||||||
|
run: |
|
||||||
|
tar -czf bun-app.tar.gz ./dist
|
||||||
|
|
||||||
|
- name: Upload release asset to Forgejo
|
||||||
|
uses: https://code.forgejo.org/actions/upload-release-asset@v1
|
||||||
|
with:
|
||||||
|
tag: ${{ github.ref_name }}
|
||||||
|
file: bun-app.tar.gz
|
13
Dockerfile
Normal file
13
Dockerfile
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
FROM oven/bun:latest
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY package.json ./
|
||||||
|
|
||||||
|
RUN test -f bun.lockb && cp bun.lockb . || true
|
||||||
|
|
||||||
|
RUN [ -f bun.lockb ] && bun install --frozen-lockfile || bun install
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
CMD ["bun", "run", "start"]
|
18
compose.yml
Normal file
18
compose.yml
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
services:
|
||||||
|
booru-api:
|
||||||
|
container_name: profilePage
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
volumes:
|
||||||
|
- .:/app/profilePage
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "${PORT:-8080}:${PORT:-8080}"
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
networks:
|
||||||
|
- profilePage-network
|
||||||
|
|
||||||
|
networks:
|
||||||
|
profilePage-network:
|
||||||
|
driver: bridge
|
Loading…
Add table
Reference in a new issue