mirror of
https://github.com/zvx-echo6/meshai.git
synced 2026-05-21 15:14:45 +02:00
Add GHCR publishing workflow and update docker-compose for registry pull
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
5294b027e7
commit
8c2c4d2aef
4 changed files with 86 additions and 19 deletions
58
.github/workflows/docker-publish.yml
vendored
Normal file
58
.github/workflows/docker-publish.yml
vendored
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
name: Build and Publish
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
tags: [ 'v*.*.*' ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: ${{ github.repository }}
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
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 into registry ${{ env.REGISTRY }}
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Extract Docker metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
tags: |
|
||||
type=raw,value=latest,enable={{is_default_branch}}
|
||||
type=ref,event=tag
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
|
@ -13,6 +13,9 @@ FROM python:3.11-slim-bookworm
|
|||
LABEL maintainer="K7ZVX <matt@echo6.co>"
|
||||
LABEL description="MeshAI - LLM-powered Meshtastic assistant"
|
||||
LABEL version="0.1.0"
|
||||
LABEL org.opencontainers.image.source=https://github.com/zvx-echo6/meshai
|
||||
LABEL org.opencontainers.image.description="MeshAI - LLM-powered Meshtastic assistant"
|
||||
LABEL org.opencontainers.image.licenses=MIT
|
||||
|
||||
# Build arguments
|
||||
ARG UID=1000
|
||||
|
|
@ -35,8 +38,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||
# For process management
|
||||
procps \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
# Install ttyd for web-based config interface
|
||||
&& curl -sL https://github.com/tsl0922/ttyd/releases/download/1.7.7/ttyd.x86_64 -o /usr/local/bin/ttyd \
|
||||
# Install ttyd for web-based config interface (arch-aware)
|
||||
&& TTYD_ARCH=$(dpkg --print-architecture | sed 's/amd64/x86_64/' | sed 's/arm64/aarch64/') \
|
||||
&& curl -sL "https://github.com/tsl0922/ttyd/releases/download/1.7.7/ttyd.${TTYD_ARCH}" -o /usr/local/bin/ttyd \
|
||||
&& chmod +x /usr/local/bin/ttyd
|
||||
|
||||
# Create non-root user
|
||||
|
|
|
|||
21
README.md
21
README.md
|
|
@ -133,20 +133,21 @@ DM: Tell me a short joke
|
|||
### Quick Start with Docker
|
||||
|
||||
```bash
|
||||
# Clone and enter directory
|
||||
git clone https://github.com/zvx-echo6/meshai.git
|
||||
cd meshai
|
||||
# Create working directory
|
||||
mkdir -p meshai/data && cd meshai
|
||||
|
||||
# Copy example config
|
||||
cp config.example.yaml data/config.yaml
|
||||
# Download docker-compose file
|
||||
curl -O https://raw.githubusercontent.com/zvx-echo6/meshai/main/docker-compose.yml
|
||||
|
||||
# Copy and edit config
|
||||
curl -o data/config.yaml https://raw.githubusercontent.com/zvx-echo6/meshai/main/config.example.yaml
|
||||
# Edit data/config.yaml with your settings
|
||||
|
||||
# For TCP connection to Meshtastic node:
|
||||
docker compose -f docker-compose.yml -f docker-compose.tcp.yml up -d
|
||||
# Start
|
||||
docker compose up -d
|
||||
|
||||
# For Serial connection:
|
||||
# First edit docker-compose.serial.yml to set your device path
|
||||
docker compose -f docker-compose.yml -f docker-compose.serial.yml up -d
|
||||
# View logs
|
||||
docker compose logs -f
|
||||
```
|
||||
|
||||
### Docker Configuration
|
||||
|
|
|
|||
|
|
@ -13,13 +13,17 @@
|
|||
|
||||
services:
|
||||
meshai:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
args:
|
||||
UID: ${UID:-1000}
|
||||
GID: ${GID:-1000}
|
||||
image: meshai:latest
|
||||
# Pull from GitHub Container Registry
|
||||
image: ghcr.io/zvx-echo6/meshai:latest
|
||||
|
||||
# Uncomment to build locally instead of pulling
|
||||
# build:
|
||||
# context: .
|
||||
# dockerfile: Dockerfile
|
||||
# args:
|
||||
# UID: ${UID:-1000}
|
||||
# GID: ${GID:-1000}
|
||||
|
||||
container_name: meshai
|
||||
restart: unless-stopped
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue