forked from chatpire/chatgpt-web-share
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
35 lines (23 loc) · 798 Bytes
/
Dockerfile
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
FROM golang:1.20-alpine AS ProxyBuilder
COPY ChatGPT-Proxy-V4 /app/ChatGPT-Proxy-V4
WORKDIR /app/ChatGPT-Proxy-V4
RUN CGO_ENABLED=0 go build -a -installsuffix cgo .
FROM python:3.10-alpine
ARG PIP_CACHE_DIR=/pip_cache
ARG TARGETARCH
RUN mkdir -p /app/backend
RUN apk add --update caddy
RUN if [ "${TARGETARCH}" = "arm64" ] ; then \
apk add --no-cache gcc musl-dev libffi-dev \
; fi
COPY backend/requirements.txt /tmp/requirements.txt
RUN pip install -r /tmp/requirements.txt
COPY Caddyfile /app/Caddyfile
COPY backend /app/backend
COPY frontend/dist /app/dist
COPY --from=ProxyBuilder /app/ChatGPT-Proxy-V4/ChatGPT-Proxy-V4 /app/backend/ChatGPT-Proxy-V4
WORKDIR /app
EXPOSE 80
COPY startup.sh /app/startup.sh
RUN chmod +x /app/startup.sh; mkdir /data
CMD ["/app/startup.sh"]