feat: add Dockerfile and docker-compose for containerized deployment
This commit is contained in:
12
Dockerfile
Normal file
12
Dockerfile
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
FROM golang:1.26.4-alpine AS builder
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
COPY go.mod go.sum ./
|
||||||
|
RUN go mod download
|
||||||
|
COPY . .
|
||||||
|
RUN CGO_ENABLED=0 go build -o /divad ./cmd/divad
|
||||||
|
|
||||||
|
FROM gcr.io/distroless/static-debian13:nonroot
|
||||||
|
COPY --from=builder /divad /divad
|
||||||
|
EXPOSE 8080
|
||||||
|
ENTRYPOINT ["/divad"]
|
||||||
27
docker-compose.yml
Normal file
27
docker-compose.yml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
services:
|
||||||
|
divacode:
|
||||||
|
build: .
|
||||||
|
container_name: divacode-agent
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "8081:8080"
|
||||||
|
environment:
|
||||||
|
LLAMACPP_URL: ${LLAMACPP_URL:-http://host.docker.internal:8080}
|
||||||
|
DB_PATH: /data/divacode.db
|
||||||
|
COMPANION_DB_PATH: /data/companion.db
|
||||||
|
SYSTEM_PROMPT: ${SYSTEM_PROMPT:-You are Diva, a curious and thoughtful AI companion.}
|
||||||
|
LOG_LEVEL: ${LOG_LEVEL:-INFO}
|
||||||
|
TEMPERATURE: ${TEMPERATURE:-0.85}
|
||||||
|
TOP_P: ${TOP_P:-0.9}
|
||||||
|
MAX_TOKENS: ${MAX_TOKENS:-2048}
|
||||||
|
CONTEXT_SIZE: ${CONTEXT_SIZE:-8192}
|
||||||
|
API_ENABLED: "true"
|
||||||
|
API_PORT: "8080"
|
||||||
|
SCHEDULER_INTERVAL: ${SCHEDULER_INTERVAL:-15m}
|
||||||
|
AUTO_DIARY: ${AUTO_DIARY:-true}
|
||||||
|
DIARY_HOUR: ${DIARY_HOUR:-23}
|
||||||
|
volumes:
|
||||||
|
- divacode-data:/data
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
divacode-data:
|
||||||
Reference in New Issue
Block a user