UPDATE: Chatbot module
All checks were successful
Build and Release / release (push) Successful in 2m13s

This commit is contained in:
2026-05-05 00:09:55 +07:00
parent 1998cf2ec0
commit a8f0597e59
33 changed files with 1042 additions and 65 deletions

32
deployment/app/Dockerfile Normal file
View File

@@ -0,0 +1,32 @@
FROM golang:1.26.1-alpine AS builder
RUN apk add --no-cache git
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o history-api ./cmd/api
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o email-worker ./cmd/worker/email
RUN GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o storage-worker ./cmd/worker/storage
FROM alpine:latest
RUN apk --no-cache add ca-certificates tzdata
ENV TZ=Asia/Ho_Chi_Minh
WORKDIR /app
COPY --from=builder /app/history-api .
COPY --from=builder /app/email-worker .
COPY --from=builder /app/storage-worker .
COPY data ./data
RUN chmod +x ./history-api ./email-worker ./storage-worker
EXPOSE 3344
CMD ["./history-api"]

View File

@@ -0,0 +1,21 @@
FROM postgis/postgis:18-3.6
# Install build dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
postgresql-server-dev-18 \
git \
ca-certificates && \
rm -rf /var/lib/apt/lists/*
# Build and install pgvector from source
RUN cd /tmp && \
git clone --branch v0.8.2 https://github.com/pgvector/pgvector.git && \
cd pgvector && \
make && \
make install && \
rm -rf /tmp/pgvector
# Cleanup
RUN apt-get purge -y --auto-remove build-essential postgresql-server-dev-18 git