mirror of
https://github.com/revanced/revanced-api.git
synced 2025-04-29 22:24:31 +02:00

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Alexandre Teles (afterSt0rm) <alexandre.teles@ufba.br>
37 lines
679 B
Docker
37 lines
679 B
Docker
## Build dependencies
|
|
FROM python:3.11-slim as dependencies
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends gcc git \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN python -m venv /opt/venv
|
|
ENV PATH="/opt/venv/bin:$PATH"
|
|
|
|
COPY requirements.txt .
|
|
|
|
RUN pip install -r requirements.txt
|
|
|
|
## Image
|
|
FROM python:3.11-slim
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends curl \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
ENV PATH="/opt/venv/bin:$PATH"
|
|
|
|
COPY --from=dependencies /opt/venv /opt/venv
|
|
COPY . .
|
|
|
|
VOLUME persistance
|
|
|
|
CMD docker/run-backend.sh
|
|
HEALTHCHECK CMD docker/run-healthcheck.sh
|
|
|
|
EXPOSE 8000
|