File size: 614 Bytes
2b54096
cfb38bf
2b54096
 
cfb38bf
07a8bc0
d78806a
 
2b54096
 
 
b51d461
c22696c
cfb38bf
c22696c
b51d461
 
cfb38bf
2b54096
cfb38bf
2b54096
c22696c
2b54096
c22696c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# build stage
FROM ghcr.io/yufeikang/raycast_api_proxy:main AS builder

# run stage
FROM caddy:alpine AS runner

RUN apk add --no-cache python3 
RUN apk add py3-pip && pip3 install grpcio

# retrieve packages from build stage
ENV PYTHONPATH=/project/pkgs

WORKDIR /project

RUN chmod 777 -R /project
RUN mkdir -p ./sync && chmod 777 -R ./sync

COPY --from=builder /project/pkgs /project/pkgs
COPY --from=builder /project/app /project/app
COPY Caddyfile ./Caddyfile

EXPOSE 3000

CMD ["sh", "-c", "caddy run --config /project/Caddyfile --adapter caddyfile & python -m uvicorn app.main:app --host 0.0.0.0 --port 80"]