raycast / Dockerfile
sfun's picture
Update Dockerfile
c5a5055 verified
raw
history blame
846 Bytes
# build stage
FROM ghcr.io/yufeikang/raycast_api_proxy:main AS builder
# run stage
FROM caddy:alpine AS runner
# Install python3 and pip
RUN apk add --no-cache python3 py3-pip
# Create a virtual environment
RUN python3 -m venv /venv
# Activate the virtual environment and install grpcio
RUN /venv/bin/pip install grpcio
# Set the virtual environment as the default Python environment
ENV PATH="/venv/bin:$PATH"
# 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"]