Workflow: Add formula11 docker workflow
All checks were successful
Build Formula11 Docker Image / pocketbase-docker (push) Successful in 9s
All checks were successful
Build Formula11 Docker Image / pocketbase-docker (push) Successful in 9s
This commit is contained in:
20
.dockerignore
Normal file
20
.dockerignore
Normal file
@ -0,0 +1,20 @@
|
||||
.direnv
|
||||
.git
|
||||
.gitea
|
||||
.idea
|
||||
.svelte-kit
|
||||
build
|
||||
node_modules
|
||||
pb_data
|
||||
pb_migrations
|
||||
|
||||
.dockerignore
|
||||
.envrc
|
||||
.gitignore
|
||||
|
||||
README.md
|
||||
flake.lock
|
||||
flake.nix
|
||||
formula11.dockerfile
|
||||
pocketbase.dockerfile
|
||||
prettier.config.js
|
25
.gitea/workflows/formula11-docker.yaml
Normal file
25
.gitea/workflows/formula11-docker.yaml
Normal file
@ -0,0 +1,25 @@
|
||||
name: Build Formula11 Docker Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
# paths:
|
||||
# - ".gitea/workflows/pocketbase-docker.yaml"
|
||||
# - "pocketbase.dockerfile"
|
||||
|
||||
jobs:
|
||||
pocketbase-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 Pocketbase Docker Image
|
||||
run: docker build --build-arg PB_VERSION=0.25.0 --file pocketbase.dockerfile --tag gitea.vps.chriphost.de/christoph/pocketbase:0.25.0 .
|
||||
- name: Push Pocketbase Docker Image
|
||||
run: docker push gitea.vps.chriphost.de/christoph/pocketbase:0.25.0
|
27
formula11.dockerfile
Normal file
27
formula11.dockerfile
Normal file
@ -0,0 +1,27 @@
|
||||
# Build the node application
|
||||
FROM node:23-alpine AS builder
|
||||
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
|
||||
RUN npm ci
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN npm run build
|
||||
RUN npm prune --production
|
||||
|
||||
# Copy the built application to a minimal image
|
||||
FROM node:23-alpine
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/build build/
|
||||
# If all deps are devDependencies, this should theoretically not be required
|
||||
# COPY --from=builder /app/node_modules node_modules/
|
||||
COPY package.json .
|
||||
|
||||
EXPOSE 5173
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
CMD [ "node", "build" ]
|
Reference in New Issue
Block a user