feat: add Docker support with Dockerfile, compose, CI, and oneliner install
- Multi-stage Dockerfile (node build + nginx:alpine serve) - nginx.conf with SPA fallback, gzip, asset caching - docker-compose.yml for easy deployment - GitHub Actions workflow to build & push to ghcr.io on every push - .dockerignore to keep image lean - Updated README with Docker-first quick start and badge
This commit is contained in:
7
.dockerignore
Normal file
7
.dockerignore
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
node_modules
|
||||||
|
dist
|
||||||
|
.env
|
||||||
|
.env.*
|
||||||
|
!.env.example
|
||||||
|
.git
|
||||||
|
*.md
|
||||||
39
.github/workflows/docker.yml
vendored
Normal file
39
.github/workflows/docker.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
name: Docker
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [main]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-push:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
packages: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- 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 metadata
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: ghcr.io/${{ github.repository }}
|
||||||
|
tags: |
|
||||||
|
type=raw,value=latest
|
||||||
|
type=sha,prefix=
|
||||||
|
|
||||||
|
- name: Build and push
|
||||||
|
uses: docker/build-push-action@v6
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
14
Dockerfile
Normal file
14
Dockerfile
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
# Stage 1: Build
|
||||||
|
FROM node:22-alpine AS build
|
||||||
|
WORKDIR /app
|
||||||
|
COPY package.json package-lock.json ./
|
||||||
|
RUN npm ci
|
||||||
|
COPY . .
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
# Stage 2: Serve
|
||||||
|
FROM nginx:alpine
|
||||||
|
COPY --from=build /app/dist /usr/share/nginx/html
|
||||||
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
EXPOSE 80
|
||||||
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
13
FEEDBACK.md
13
FEEDBACK.md
@@ -43,7 +43,7 @@
|
|||||||
## Item #6
|
## Item #6
|
||||||
- **Date:** 2026-02-11
|
- **Date:** 2026-02-11
|
||||||
- **Priority:** high
|
- **Priority:** high
|
||||||
- **Status:** pending
|
- **Status:** in-progress
|
||||||
- **Description:** Installation simplifiée — Docker + oneliner
|
- **Description:** Installation simplifiée — Docker + oneliner
|
||||||
- **Dockerfile** : image légère (nginx:alpine ou similar) qui sert le build statique. Multi-stage : node pour build, nginx pour serve. Pas de secrets dans l'image (tout est runtime via le login screen).
|
- **Dockerfile** : image légère (nginx:alpine ou similar) qui sert le build statique. Multi-stage : node pour build, nginx pour serve. Pas de secrets dans l'image (tout est runtime via le login screen).
|
||||||
- **docker-compose.yml** : exemple simple avec juste le container PinchChat
|
- **docker-compose.yml** : exemple simple avec juste le container PinchChat
|
||||||
@@ -51,3 +51,14 @@
|
|||||||
- **Oneliner** : `docker run -p 3000:80 ghcr.io/marlburrow/pinchchat:latest` dans le README
|
- **Oneliner** : `docker run -p 3000:80 ghcr.io/marlburrow/pinchchat:latest` dans le README
|
||||||
- Alternative sans Docker : `npx pinchchat` ou un script curl qui télécharge le dernier release (build statique) et lance un serveur
|
- Alternative sans Docker : `npx pinchchat` ou un script curl qui télécharge le dernier release (build statique) et lance un serveur
|
||||||
- Mettre à jour le README avec les nouvelles méthodes d'installation
|
- Mettre à jour le README avec les nouvelles méthodes d'installation
|
||||||
|
|
||||||
|
## Item #7
|
||||||
|
- **Date:** 2026-02-11
|
||||||
|
- **Priority:** high
|
||||||
|
- **Status:** pending
|
||||||
|
- **Description:** Affichage des images dans le chat
|
||||||
|
- Rendre les images inline dans les messages (quand le gateway envoie des images en base64/URL via `mediaUrls` ou content blocks de type image)
|
||||||
|
- Rendre les images dans les tool results (quand un tool `read` retourne une image, l'afficher au lieu de juste "Read image file [image/png]")
|
||||||
|
- Support des formats courants : png, jpg, gif, webp
|
||||||
|
- Les images doivent être cliquables pour voir en taille réelle (lightbox ou nouvel onglet)
|
||||||
|
- Garder le style dark theme cohérent (bordures arrondies, pas de fond blanc autour des images)
|
||||||
|
|||||||
30
README.md
30
README.md
@@ -3,6 +3,7 @@
|
|||||||
[](https://github.com/MarlBurroW/pinchchat/actions/workflows/ci.yml)
|
[](https://github.com/MarlBurroW/pinchchat/actions/workflows/ci.yml)
|
||||||
[](https://opensource.org/licenses/MIT)
|
[](https://opensource.org/licenses/MIT)
|
||||||
[](https://nodejs.org/)
|
[](https://nodejs.org/)
|
||||||
|
[](https://github.com/MarlBurroW/pinchchat/pkgs/container/pinchchat)
|
||||||
|
|
||||||
**A sleek, dark-themed webchat UI for [OpenClaw](https://github.com/openclaw/openclaw) — monitor sessions, stream responses, and inspect tool calls in real-time.**
|
**A sleek, dark-themed webchat UI for [OpenClaw](https://github.com/openclaw/openclaw) — monitor sessions, stream responses, and inspect tool calls in real-time.**
|
||||||
|
|
||||||
@@ -22,18 +23,31 @@
|
|||||||
|
|
||||||
## 🚀 Quick Start
|
## 🚀 Quick Start
|
||||||
|
|
||||||
### Prerequisites
|
### Docker (recommended)
|
||||||
|
|
||||||
- **Node.js 18+**
|
```bash
|
||||||
- **OpenClaw gateway** running and accessible
|
docker run -p 3000:80 ghcr.io/marlburrow/pinchchat:latest
|
||||||
|
```
|
||||||
|
|
||||||
### Installation
|
Open `http://localhost:3000` and enter your OpenClaw gateway URL + token on the login screen.
|
||||||
|
|
||||||
|
Or use Docker Compose:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
curl -O https://raw.githubusercontent.com/MarlBurroW/pinchchat/main/docker-compose.yml
|
||||||
|
docker compose up -d
|
||||||
|
```
|
||||||
|
|
||||||
|
### From source
|
||||||
|
|
||||||
|
**Prerequisites:** Node.js 18+, an OpenClaw gateway running and accessible.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/MarlBurroW/pinchchat.git
|
git clone https://github.com/MarlBurroW/pinchchat.git
|
||||||
cd pinchchat
|
cd pinchchat
|
||||||
npm install
|
npm install
|
||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
|
npm run dev
|
||||||
```
|
```
|
||||||
|
|
||||||
Optionally edit `.env` to pre-fill the gateway URL:
|
Optionally edit `.env` to pre-fill the gateway URL:
|
||||||
@@ -43,13 +57,7 @@ VITE_GATEWAY_WS_URL=ws://localhost:18789
|
|||||||
VITE_LOCALE=en # or "fr" for French UI
|
VITE_LOCALE=en # or "fr" for French UI
|
||||||
```
|
```
|
||||||
|
|
||||||
Start the dev server:
|
### Production build
|
||||||
|
|
||||||
```bash
|
|
||||||
npm run dev
|
|
||||||
```
|
|
||||||
|
|
||||||
### Production
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm run build
|
npm run build
|
||||||
|
|||||||
8
docker-compose.yml
Normal file
8
docker-compose.yml
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
services:
|
||||||
|
pinchchat:
|
||||||
|
image: ghcr.io/marlburrow/pinchchat:latest
|
||||||
|
# Or build locally:
|
||||||
|
# build: .
|
||||||
|
ports:
|
||||||
|
- "3000:80"
|
||||||
|
restart: unless-stopped
|
||||||
21
nginx.conf
Normal file
21
nginx.conf
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name _;
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
index index.html;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Cache static assets
|
||||||
|
location /assets/ {
|
||||||
|
expires 1y;
|
||||||
|
add_header Cache-Control "public, immutable";
|
||||||
|
}
|
||||||
|
|
||||||
|
# Gzip
|
||||||
|
gzip on;
|
||||||
|
gzip_types text/plain text/css application/json application/javascript text/xml application/xml text/javascript image/svg+xml;
|
||||||
|
gzip_min_length 256;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user