[feature] Add prebuilt docker images

This commit is contained in:
Tyler
2026-07-05 01:41:54 -04:00
parent f18bacf3ad
commit 2bd40b9e01
3 changed files with 67 additions and 1 deletions
+50
View File
@@ -0,0 +1,50 @@
name: Build and Push Docker Images
on:
push:
branches:
- main
- '**'
jobs:
build:
permissions:
packages: write
contents: read
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}
tags: |
type=ref,event=branch
type=sha,format=short
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
- name: Build and Push Docker Image
uses: docker/build-push-action@v5
with:
context: .
file: deploy/docker/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
+11 -1
View File
@@ -92,13 +92,23 @@ If `docker` is not recognized, install Docker Desktop and open it once before ru
### Start SketchForge ### Start SketchForge
#### Compose (Build images locally)
From the SketchForge project folder, run: From the SketchForge project folder, run:
```bash ```bash
docker compose -f deploy/docker/compose.yaml up --build -d docker compose -f deploy/docker/compose.yaml up --build -d
``` ```
The first start can take a few minutes because Docker builds the app. After it finishes, open this on the same computer: The first start can take a few minutes because Docker builds the app.
#### Standalone (Prebuilt)
```bash
docker run -d --name sketchforge --restart unless-stopped -p 3000:80 ghcr.io/Formsmith746/sketchforge-3d:latest
```
After running, open this on the same computer:
```text ```text
http://127.0.0.1:3000/ http://127.0.0.1:3000/
+6
View File
@@ -0,0 +1,6 @@
services:
sketchforge:
image: ghcr.io/Formsmith746/sketchforge-3d:latest
ports:
- "${SKETCHFORGE_PORT:-3000}:80"
restart: unless-stopped