aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Mathes <adam@adammathes.com>2026-02-13 17:03:35 -0800
committerAdam Mathes <adam@adammathes.com>2026-02-13 17:03:35 -0800
commitfb7d5bfb0b780486d3b6191dda7c0a340abe286e (patch)
tree8b81f60f0bf7c97fa96f85816f9abd89fc82d15d
parentddcbfc92b9c7b1c932c4bdcadf393b95aa0adc0c (diff)
downloadneko-fb7d5bfb0b780486d3b6191dda7c0a340abe286e.tar.gz
neko-fb7d5bfb0b780486d3b6191dda7c0a340abe286e.tar.bz2
neko-fb7d5bfb0b780486d3b6191dda7c0a340abe286e.zip
feat: add docker support and update readme (NK-kqt9oc)
-rw-r--r--Dockerfile40
-rw-r--r--README.md39
-rw-r--r--docker-compose.yaml11
3 files changed, 78 insertions, 12 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..89ba3fd
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,40 @@
+# Stage 1: Frontend Build
+FROM node:20-slim AS frontend-builder
+WORKDIR /app/frontend
+COPY frontend/package*.json ./
+RUN npm install
+COPY frontend/ ./
+RUN npm run build
+
+# Stage 2: Backend Build
+FROM golang:1.23-bullseye AS backend-builder
+RUN go install github.com/GeertJohan/go.rice/rice@latest
+
+WORKDIR /app
+COPY go.mod go.sum ./
+RUN go mod download
+
+COPY . .
+# Copy built frontend assets from Stage 1
+COPY --from=frontend-builder /app/frontend/dist ./frontend/dist
+
+# Embed assets and build the binary
+RUN rice -i ./web embed-go
+RUN go build -o neko .
+
+# Stage 3: Final Image
+FROM debian:bullseye-slim
+WORKDIR /app
+COPY --from=backend-builder /app/neko .
+COPY --from=backend-builder /app/static ./static
+
+# Ensure data directory exists
+RUN mkdir -p /app/data
+
+# Default environment variables
+ENV NEKO_PORT=8080
+ENV NEKO_DB=/app/data/neko.db
+
+EXPOSE 8080
+
+CMD ["./neko", "-s", "8080", "-d", "/app/data/neko.db"]
diff --git a/README.md b/README.md
index b7e97e8..d79e3d1 100644
--- a/README.md
+++ b/README.md
@@ -19,25 +19,26 @@
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-generate-toc again -->
- [Neko](#neko)
- - [Features](#features)
- - [Screenshots](#screenshots)
+ - [Features](#features)
+ - [Screenshots](#screenshots)
- [Installation](#installation)
- - [Requirements](#requirements)
- - [Building](#building)
- - [Dependencies](#dependencies)
+ - [Requirements](#requirements)
+ - [Building](#building)
+ - [Build with React Frontend](#build-with-react-frontend)
- [Configuration](#configuration)
- - [Storage](#storage)
+ - [Storage](#storage)
- [Usage](#usage)
- - [Web Interface](#web-interface)
- - [Add Feed](#add-feed)
- - [Crawl Feeds](#crawl-feeds)
- - [Export](#export)
+ - [Web Interface](#web-interface)
+ - [Add Feed](#add-feed)
+ - [Crawl Feeds](#crawl-feeds)
+ - [Export](#export)
- [All Command Line Options](#all-command-line-options)
- [Configuration File](#configuration-file)
- [TODO](#todo)
- [History](#history)
- - [Early 2017](#early-2017)
- - [July 2018 -- v0.2](#july-2018----v02)
+ - [Early 2017](#early-2017)
+ - [July 2018 -- v0.2](#july-2018----v02)
+ - [February 2026 -- v.03 -- Vibe-code Modernization](#february-2026----v03----vibe-code-modernization)
- [Feedback](#feedback)
<!-- markdown-toc end -->
@@ -78,6 +79,20 @@ Binaries are not yet officially provided, but the project is designed for easy s
## Building
+### Docker
+
+The easiest way to run Neko is using Docker and Docker Compose.
+
+1. **Build and Start**:
+ ```bash
+ docker-compose up -d
+ ```
+
+2. **Access**:
+ The web interface will be available at `http://localhost:8080`.
+
+Data is persisted in a Docker volume named `neko-data` (mapping to `/app/data/neko.db` inside the container).
+
### Build with React Frontend
Neko now includes a modern React frontend. To build the full application:
diff --git a/docker-compose.yaml b/docker-compose.yaml
new file mode 100644
index 0000000..85e6ee3
--- /dev/null
+++ b/docker-compose.yaml
@@ -0,0 +1,11 @@
+services:
+ neko:
+ build: .
+ ports:
+ - "8080:8080"
+ volumes:
+ - neko-data:/app/data
+ restart: unless-stopped
+
+volumes:
+ neko-data: