fix: replay channel state on SPA reconnect #61
40
README.md
40
README.md
@@ -1850,26 +1850,14 @@ docker run -p 8080:8080 \
|
||||
neoirc
|
||||
```
|
||||
|
||||
The Dockerfile is a multi-stage build:
|
||||
1. **Build stage**: Compiles `neoircd` and `neoirc-cli` (CLI built to verify
|
||||
compilation, not included in final image)
|
||||
2. **Final stage**: Alpine Linux + `neoircd` binary only
|
||||
|
||||
```dockerfile
|
||||
FROM golang:1.24-alpine AS builder
|
||||
WORKDIR /src
|
||||
RUN apk add --no-cache make
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY . .
|
||||
RUN go build -o /neoircd ./cmd/neoircd/
|
||||
RUN go build -o /neoirc-cli ./cmd/neoirc-cli/
|
||||
|
||||
FROM alpine:latest
|
||||
COPY --from=builder /neoircd /usr/local/bin/neoircd
|
||||
EXPOSE 8080
|
||||
CMD ["neoircd"]
|
||||
```
|
||||
The Dockerfile is a four-stage build:
|
||||
1. **web-builder**: Installs Node dependencies and compiles the SPA (JSX →
|
||||
bundled JS via esbuild) into `web/dist/`
|
||||
2. **lint**: Runs formatting checks and golangci-lint against the Go source
|
||||
(with the built SPA assets copied in)
|
||||
3. **builder**: Runs tests and compiles static `neoircd` and `neoirc-cli`
|
||||
binaries (CLI built to verify compilation, not included in final image)
|
||||
4. **final**: Minimal Alpine image with only the `neoircd` binary
|
||||
|
||||
### Binary
|
||||
|
||||
@@ -2318,10 +2306,14 @@ neoirc/
|
||||
│ └── http.go # HTTP timeouts
|
||||
├── web/
|
||||
│ ├── embed.go # go:embed directive for SPA
|
||||
│ └── dist/ # Built SPA (vanilla JS, no build step)
|
||||
│ ├── index.html
|
||||
│ ├── style.css
|
||||
│ └── app.js
|
||||
│ ├── build.sh # SPA build script (esbuild, runs in Docker)
|
||||
│ ├── package.json # Node dependencies (preact, esbuild)
|
||||
│ ├── package-lock.json
|
||||
│ ├── src/ # SPA source files (JSX + HTML + CSS)
|
||||
│ │ ├── app.jsx
|
||||
│ │ ├── index.html
|
||||
│ │ └── style.css
|
||||
│ └── dist/ # Generated at Docker build time (not committed)
|
||||
├── schema/ # JSON Schema definitions (planned)
|
||||
├── go.mod
|
||||
├── go.sum
|
||||
|
||||
Reference in New Issue
Block a user