Add Dockerfile + Workflow
All checks were successful
Build StateSpaces Docker Image / statespaces-docker (push) Successful in 38s

This commit is contained in:
2025-08-31 19:32:52 +02:00
parent e0275b12af
commit c936f13059
2 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,22 @@
name: Build StateSpaces Docker Image
on:
push:
branches: [main]
jobs:
statespaces-docker:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Login to container registry
uses: docker/login-action@v3
with:
registry: gitea.vps.chriphost.de
username: ${{ secrets.CONTAINER_REGISTRY_USER }}
password: ${{ secrets.CONTAINER_REGISTRY_TOKEN }}
- name: Build StateSpaces Docker Image
run: docker build --file dockerfile --tag gitea.vps.chriphost.de/christoph/statespaces:latest .
- name: Push StateSpaces Docker Image
run: docker push gitea.vps.chriphost.de/christoph/statespaces:latest

11
dockerfile Normal file
View File

@ -0,0 +1,11 @@
FROM node:24-alpine AS builder
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm install
COPY . .
RUN npm run build
FROM busybox:1.30 AS runner
WORKDIR /app
COPY --from=builder /app/dist .
CMD ["busybox", "httpd", "-f", "-v", "-p", "8080"]