feat: add GitHub Actions Docker publish workflow and prebuilt install
- Build and push backend/frontend images to ghcr.io on every push to main and on version tags - Add docker-compose.prebuilt.yml for pull-based install (no clone needed) - Update README Quick Start with inline install one-liner using prebuilt images
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
name: Docker
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
tags: ['v*']
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- image: ghcr.io/pouzor/homelable-backend
|
||||
dockerfile: Dockerfile.backend
|
||||
- image: ghcr.io/pouzor/homelable-frontend
|
||||
dockerfile: Dockerfile.frontend
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Log in to GHCR
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Extract metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ matrix.image }}
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
type=raw,value=latest,enable={{is_default_branch}}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ${{ matrix.dockerfile }}
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
@@ -9,10 +9,12 @@ Homelable also offers a healthcheck system (WIP) through multiple methods (ping/
|
||||
|
||||
## Quick Start — Docker
|
||||
|
||||
No clone needed. Pull the pre-built images directly:
|
||||
|
||||
```bash
|
||||
git clone https://github.com/Pouzor/homelable.git
|
||||
cd homelable
|
||||
cp .env.example .env
|
||||
mkdir homelable && cd homelable
|
||||
curl -fsSL https://raw.githubusercontent.com/Pouzor/homelable/main/.env.example -o .env
|
||||
curl -fsSL https://raw.githubusercontent.com/Pouzor/homelable/main/docker-compose.prebuilt.yml -o docker-compose.yml
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
@@ -24,6 +26,15 @@ Open **http://localhost:3000** — login with `admin` / `admin`.
|
||||
>
|
||||
> ⚠️ Keep the single quotes around the hash value in `.env` — bcrypt hashes contain `$` characters that Docker Compose would otherwise misinterpret.
|
||||
|
||||
### Build from source
|
||||
|
||||
```bash
|
||||
git clone https://github.com/Pouzor/homelable.git
|
||||
cd homelable
|
||||
cp .env.example .env
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Proxmox LXC Install
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
services:
|
||||
backend:
|
||||
image: ghcr.io/pouzor/homelable-backend:latest
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
SQLITE_PATH: /app/data/homelab.db
|
||||
CORS_ORIGINS: '["http://localhost:3000"]'
|
||||
volumes:
|
||||
- backend_data:/app/data
|
||||
networks:
|
||||
- homelable
|
||||
cap_add:
|
||||
- NET_RAW
|
||||
|
||||
frontend:
|
||||
image: ghcr.io/pouzor/homelable-frontend:latest
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "3000:80"
|
||||
depends_on:
|
||||
- backend
|
||||
networks:
|
||||
- homelable
|
||||
|
||||
volumes:
|
||||
backend_data:
|
||||
|
||||
networks:
|
||||
homelable:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user