mirror of
https://github.com/yzernik/squeaknode.git
synced 2026-08-20 13:28:20 +02:00
* 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
49 lines
1.1 KiB
Docker
49 lines
1.1 KiB
Docker
#FROM node:10-stretch
|
|
FROM ubuntu:20.04
|
|
|
|
ARG PORT
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
RUN apt-get -qq update && apt-get -qq install -y \
|
|
curl \
|
|
unzip \
|
|
nodejs \
|
|
npm \
|
|
git \
|
|
git-core
|
|
|
|
RUN npm install -g serve
|
|
|
|
WORKDIR /tmp
|
|
|
|
RUN curl -sSL https://github.com/protocolbuffers/protobuf/releases/download/v3.12.2/\
|
|
protoc-3.12.2-linux-x86_64.zip -o protoc.zip && \
|
|
unzip -qq protoc.zip && \
|
|
cp ./bin/protoc /usr/local/bin/protoc
|
|
|
|
RUN curl -sSL https://github.com/grpc/grpc-web/releases/download/1.2.0/\
|
|
protoc-gen-grpc-web-1.2.0-linux-x86_64 -o /usr/local/bin/protoc-gen-grpc-web && \
|
|
chmod +x /usr/local/bin/protoc-gen-grpc-web
|
|
|
|
COPY frontend/squeak-node-frontend .
|
|
|
|
# Copy the proto files
|
|
COPY proto/* src/proto/
|
|
|
|
RUN cd src && \
|
|
protoc -I=. proto/squeak_admin.proto proto/lnd.proto \
|
|
--js_out=import_style=commonjs:. \
|
|
--grpc-web_out=import_style=commonjs,mode=grpcwebtext:.
|
|
|
|
# Copy the eslint prepend script.
|
|
COPY "docker/frontend/pb_disable-eslint.sh" .
|
|
RUN chmod +x pb_disable-eslint.sh && \
|
|
./pb_disable-eslint.sh src/proto/
|
|
|
|
RUN npm install && \
|
|
REACT_APP_PORT=${PORT} \
|
|
npm run build
|
|
|
|
EXPOSE 8081
|
|
CMD ["serve", "-s", "build", "-l", "8081"]
|