This repository was archived by the owner on Dec 29, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
48 lines (36 loc) · 1.36 KB
/
Dockerfile
File metadata and controls
48 lines (36 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
FROM debian:bookworm-slim
# --- system deps ---
RUN apt-get update && apt-get install -y \
build-essential curl wget git python3 python3-pip python3-venv \
postgresql postgresql-contrib postgresql-server-dev-all \
supervisor ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# --- install pgvector ---
RUN git clone --branch v0.7.4 https://github.com/pgvector/pgvector.git /tmp/pgvector \
&& cd /tmp/pgvector && make && make install && rm -rf /tmp/pgvector
# --- Go setup ---
RUN curl -L https://go.dev/dl/go1.22.6.linux-amd64.tar.gz | tar -C /usr/local -xz
ENV PATH="/usr/local/go/bin:${PATH}"
# --- Node (for frontend build) ---
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs
WORKDIR /app
# --- Go backend ---
COPY go.mod go.sum ./
RUN go mod download
COPY . .
# --- Python services ---
RUN pip3 install --no-cache-dir --break-system-packages -r requirements.txt
# --- Frontend build ---
WORKDIR /app/app
RUN npm install && npm run build
# Copy built static files into Go backend's static dir
WORKDIR /app
RUN mkdir -p /app/static && cp -r /app/app/dist/* /app/static/
# --- PostgreSQL init ---
RUN mkdir -p /var/lib/postgresql/data /var/run/postgresql
RUN chown -R postgres:postgres /var/lib/postgresql /var/run/postgresql
COPY ./docker/run.sh ./run.sh
RUN chmod +x ./run.sh
EXPOSE 8080
CMD ["./run.sh"]