squeaknode/Dockerfile

52 lines
998 B
Text
Raw Normal View History

FROM python:3.8-slim-buster AS compile-image
WORKDIR /
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
apt-get install -y \
libpq-dev \
gcc \
libffi-dev \
build-essential
RUN python -m venv /opt/venv
# Make sure we use the virtualenv:
ENV PATH="/opt/venv/bin:$PATH"
COPY requirements.txt /
RUN pip install --upgrade pip && \
pip install -r requirements.txt
WORKDIR /app
# Copy the source code.
COPY squeaknode ./squeaknode
COPY proto ./proto
COPY LICENSE MANIFEST.in README.md requirements.txt setup.cfg setup.py ./
RUN python3 setup.py install
FROM python:3.8-slim-buster
COPY --from=compile-image /opt/venv /opt/venv
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
apt-get install -y libpq-dev
EXPOSE 8555
EXPOSE 18555
EXPOSE 18666
EXPOSE 18777
Add admin web server (#310) * Add basic flask web server * Use ubuntu as docker base image for frontend docker build * Got web frontend server running inside sqkserver * Got client request throught flask working * Refactor makerequest function in frontend * Support sending request to flask server * Use request and reply in flask for set profile sharing method * Handle request object in flask for get followed squeaks route * Use flask endpoint for lnd getinfo * Use flask endpoint for walletbalance * Use flask for gettransactions endpoint * Use flask endpoint for lnd methods * Add set profile properties methods to flask * Move request, response protobuf to handler class * Move request, reply inside handler for get signing profiles * Move request, reply to handler for get contact profiles * Move request, reply to handler for get squeak profile * Move request reply for get profile by address to handler * Move request reply to handler for set profile attributes * Move request reply to handler for delete profile * Move request reply for make squeak to handler * Move request reply to handler for get squeak display * Move request reply to get address squeak displays * Move request reply to handler for ancestor squeaks * Move request reply to handler for delete squeak * Move request reply to handler for create peer and get peer * Move request reply to handler for peer set attributes * Move request reply to handler for more methods * Move request reply to handler for another method * Move request reply to handler for more methods * Move more request reply to handler * Move request reply to handler for all methods * Remove message conversion helper methods from servicer class * Remove duplicate protobuf conversion functions * Fix flask handling of requests * Remove old protobuf conversion methods in comments * Use helper method to simplify web server routes functions
2020-10-22 22:52:40 -04:00
# Web server
2020-10-23 22:22:34 -04:00
EXPOSE 12994
# Make sure we use the virtualenv:
ENV PATH="/opt/venv/bin:$PATH"
# Copy the entrypoint script.
COPY "start-squeaknode.sh" .
RUN chmod +x start-squeaknode.sh
CMD ["./start-squeaknode.sh"]