mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
d45487433c
- Add Docker Compose configuration for one-click deployment - Add Dockerfiles for server, agent, and web services - Add deployment script (deploy.sh) with automatic setup - Add comprehensive deployment documentation (DEPLOYMENT.md) - Use host Docker socket instead of DinD for better performance - Add Nginx configuration for web frontend - Add Makefile for common operations - Update README with Docker deployment quick start Features: - One-command deployment with ./deploy.sh - Automatic JWT secret generation - Health checks for all services - Data persistence with Docker volumes - Support for Bot container management via host Docker - Production-ready configuration examples Co-authored-by: root <root@DESKTOP-OU6H3GS.localdomain>
34 lines
691 B
Docker
34 lines
691 B
Docker
FROM golang:1.25-alpine AS builder
|
|
|
|
WORKDIR /build
|
|
|
|
RUN apk add --no-cache git make
|
|
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
|
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
|
|
go build -trimpath -ldflags "-s -w" \
|
|
-o memoh-server ./cmd/agent/main.go
|
|
|
|
FROM alpine:latest
|
|
|
|
WORKDIR /app
|
|
|
|
RUN apk add --no-cache ca-certificates tzdata wget
|
|
|
|
COPY --from=builder /build/memoh-server /app/memoh-server
|
|
|
|
COPY config.toml.example /app/config.toml.example
|
|
|
|
RUN mkdir -p /var/lib/memoh/data
|
|
|
|
EXPOSE 8080
|
|
|
|
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
|
CMD wget --no-verbose --tries=1 --spider http://localhost:8080/health || exit 1
|
|
|
|
CMD ["/app/memoh-server"]
|