2023-11-05 23:10:33 +03:00
|
|
|
FROM python:3.11.6-slim-bookworm
|
2022-06-08 01:14:56 +03:00
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
2023-11-15 22:48:04 +03:00
|
|
|
ARG DEVELOPMENT=False
|
2022-02-06 21:43:17 +03:00
|
|
|
|
|
|
|
RUN mkdir -p /usr/src/robosats
|
2022-02-07 14:21:59 +03:00
|
|
|
WORKDIR /usr/src/robosats
|
2022-02-06 21:43:17 +03:00
|
|
|
|
2023-05-01 14:38:36 +03:00
|
|
|
RUN apt-get update -qq && \
|
|
|
|
apt-get install -qq -y --no-install-recommends \
|
|
|
|
git \
|
|
|
|
libpq-dev \
|
|
|
|
curl \
|
|
|
|
build-essential \
|
|
|
|
gnupg2
|
2022-06-08 01:14:56 +03:00
|
|
|
|
2022-02-13 19:43:49 +03:00
|
|
|
RUN python -m pip install --upgrade pip
|
|
|
|
|
2022-02-06 21:43:17 +03:00
|
|
|
COPY requirements.txt ./
|
|
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
|
2023-11-15 22:48:04 +03:00
|
|
|
COPY requirements_dev.txt ./
|
|
|
|
RUN if [ "$DEVELOPMENT" = "true" ]; then \
|
|
|
|
pip install --no-cache-dir -r requirements_dev.txt; \
|
|
|
|
fi
|
|
|
|
|
2022-02-06 21:43:17 +03:00
|
|
|
# copy current dir's content to container's WORKDIR root i.e. all the contents of the robosats app
|
|
|
|
COPY . .
|
|
|
|
|
2023-05-01 14:38:36 +03:00
|
|
|
# install lnd/cln grpc services
|
2023-05-15 12:46:59 +03:00
|
|
|
RUN sh scripts/generate_grpc.sh
|
|
|
|
RUN chmod +x scripts/entrypoint.sh
|
2022-02-06 21:43:17 +03:00
|
|
|
|
|
|
|
EXPOSE 8000
|
2023-05-15 12:46:59 +03:00
|
|
|
ENTRYPOINT [ "/usr/src/robosats/scripts/entrypoint.sh" ]
|
2022-02-06 21:43:17 +03:00
|
|
|
|
2022-02-13 19:43:49 +03:00
|
|
|
CMD ["python3", "manage.py", "runserver", "0.0.0.0:8000"]
|