From 6c20ce4f70200a1c20cea508cacde549fc338232 Mon Sep 17 00:00:00 2001 From: Reckless_Satoshi Date: Fri, 12 May 2023 04:04:41 -0700 Subject: [PATCH] Simplify frontend/client dev setup, shrink nodeapp --- docker-compose.yml | 2 + .../static/assets/misc/unknown_avatar.png | Bin 10152 -> 0 bytes frontend/static/css/index.css | 2 +- nodeapp/.dockerignore | 10 ++++- nodeapp/README.md | 5 +++ nodeapp/docker-compose-dev.yml | 36 ------------------ nodeapp/docker-compose-example.yml | 21 ++++++++++ nodeapp/docker-compose.yml | 28 +++++++++++--- nodeapp/nginx.conf | 1 + setup.md | 8 ++-- 10 files changed, 65 insertions(+), 48 deletions(-) delete mode 100644 frontend/static/assets/misc/unknown_avatar.png delete mode 100644 nodeapp/docker-compose-dev.yml create mode 100644 nodeapp/docker-compose-example.yml diff --git a/docker-compose.yml b/docker-compose.yml index 004df94c..f40b3932 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -56,6 +56,8 @@ services: ROBOSATS_ONION: robosats6tkf3eva7x2voqso3a5wcorsnw34jveyxfqi2fu7oyheasid.onion network_mode: service:tor volumes: + - ./nodeapp/:/usr/src/robosats/ + - ./nodeapp/nginx.conf:/etc/nginx/nginx.conf - ./frontend/static:/usr/src/robosats/static clean-orders: diff --git a/frontend/static/assets/misc/unknown_avatar.png b/frontend/static/assets/misc/unknown_avatar.png deleted file mode 100644 index 3edf149ebc81e207825f63aa7dc8950831f61d24..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10152 zcma)ihdw3L;a8Hw(f}H|_AZl$bxB&za2w(h?lY$Yy zpg08hAhpxgghS^SKiSRsNf5*XX~SV(Jlv0wOmWcNrsg2h2t`zp zbVfikC~dX(6tFp6AD3Uh8uSWNjP8x`>-ncAOD65()y9&ta^>F6CB4V!4@JoouY>n#|HkPdZ)#DfAu zhn<7&#m2>P(Y9~>V=}RL4omHMl&XT%;i4AaOZTjQ@Aq#e(pg&?sr67W*^D11!qfXR5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3@oR1W#_A!t$zut^MwW+p5?45nx_S_AH_^U44_7wfYqJHuC=6>{eH z=^^`D9X|D6k9^{iFy9>{I)UQco$?H^g_WblN&RI#ex~wjUknKo@AhZN^kWxI)YWfD z=}&@QmEdCHgB!^fFceT;Q89B0($r+cSVxaSQ$s^AKU_*e!Y)=kC)!yk57nb>^W)vE zt|+bP*)g30ENJu3&Nkd5boTZA9o3z7@d$rpE+}-ByvGpI5e{Gs1jFEbvc6k3^Tfu= zA856+h^O(9#yZJy4m0Ck{Rj!C1<(5jw$NC7o?)A*v!;yuK~%Yw1`4}|zo0~AnhL(W@ zScx=J$k4)lS^yATA>3HmCs`malZrjGL9lfQ-d@RnnE0NX_~%6-2c(v=q4KB_sL*mG z_w7-A5^k(f>&y?->iR8M<`m1JY*3{C^6AqY0lgf>v>FsU@GvLY6C2e%2q}xfKD2;Z ze3lxOv=H)+4S}k)^;7{hhxEx}Rlo8vC%qr3Dm9kvdQF{$N`s)$CE-vONb%lw4-BQ7 zKj;G}^c5e=-@10AQ5WStZsou_eYi2Zy(k)26V=UN-zx`6KnB;jeB9yRcs{E{8i@1q zt^f0*xEiH9r=fr4^bd8mHJl4{9=oy@l|J+@+SfW-uBj}6#>Mc!zyrsa0zf!ZkiAl! zy|+3g&77U@@Tp70vZ9%jqjC})!th^^R7rtf%>rKI>7Carc*ySwn^iA;1CA77mHU5t i0qy_tqM9M>B*g2KMpzDdn*(0GgS7A5gO{q=y!?NdJhYYo diff --git a/frontend/static/css/index.css b/frontend/static/css/index.css index 282593c9..52d13473 100644 --- a/frontend/static/css/index.css +++ b/frontend/static/css/index.css @@ -130,7 +130,7 @@ input[type='number'] { transform: scaleX(-1); border: 1.3px solid #90caf9; -webkit-filter: grayscale(100%); - filter: grayscale(100%) brightness(50%) contrast(150%) drop-shadow(0.7px 0.7px 0.7px #000000); + filter: grayscale(100%) brightness(50%) contrast(180%) drop-shadow(0.7px 0.7px 0.7px #000000); } .navBarAvatarDark:after { diff --git a/nodeapp/.dockerignore b/nodeapp/.dockerignore index 17ed95fa..35bffb56 100644 --- a/nodeapp/.dockerignore +++ b/nodeapp/.dockerignore @@ -1,2 +1,10 @@ README.md -assets \ No newline at end of file +assets +static/assets/vector +static/assets/images/Ba* +static/assets/images/bot* +static/assets/images/robo* +static/assets/images/Robo* +static/assets/images/v* +docker-compose.yml +docker-compose-example.yml \ No newline at end of file diff --git a/nodeapp/README.md b/nodeapp/README.md index bde66f8c..7ced0983 100644 --- a/nodeapp/README.md +++ b/nodeapp/README.md @@ -8,6 +8,11 @@ At the moment it has no special integration with your local lightning wallet (e. The container launches two processes: 1) A set of `socat` that will expose RoboSats coordinators API over HTTP on localhost:81 using the docker orchestration TOR socks proxy and 2) Nginx, used to direct every request where needed and serve the client app locally. +# Docker compose example +You can run the client locally with the provided example orchestration. It has both, a TOR proxy container and the robosats client. +`docker-compose -f docker-compose-example.yml up` +Then just visit http://localhost:12596 + # Why host your own RoboSats client Advantages over a full over-the-internet RoboSats experience: diff --git a/nodeapp/docker-compose-dev.yml b/nodeapp/docker-compose-dev.yml deleted file mode 100644 index 7e84a6b6..00000000 --- a/nodeapp/docker-compose-dev.yml +++ /dev/null @@ -1,36 +0,0 @@ -version: '3.9' -services: - frontend: - build: ../frontend - container_name: npm-dev - restart: always - command: npm run dev - volumes: - - ../frontend:/usr/src/frontend - - ../mobile:/usr/src/mobile - - nodeapp: - build: . - container_name: nodeapp-dev - restart: always - environment: - TOR_PROXY_IP: 127.0.0.1 - TOR_PROXY_PORT: 9050 - network_mode: service:tor - volumes: - - ./:/usr/src/robosats/ - - ./nginx.conf:/etc/nginx/nginx.conf - - ../frontend/static:/usr/src/robosats/static - - tor: - build: ../docker/tor - container_name: tor-dev - restart: always - environment: - LOCAL_USER_ID: 1000 - LOCAL_GROUP_ID: 1000 - volumes: - - ../node/tor/data:/var/lib/tor - - ../node/tor/config:/etc/tor - ports: - - 12596:12596 \ No newline at end of file diff --git a/nodeapp/docker-compose-example.yml b/nodeapp/docker-compose-example.yml new file mode 100644 index 00000000..56e017df --- /dev/null +++ b/nodeapp/docker-compose-example.yml @@ -0,0 +1,21 @@ +version: '3.9' +# Example deployment of a local robosats-client using +# 'latest' tag from docker-hub +services: + robosats: + image: recksato/robosats-client:latest + container_name: robosats + restart: always + environment: + TOR_PROXY_IP: 127.0.0.1 + TOR_PROXY_PORT: 9050 + network_mode: service:tor + tor: + build: ../docker/tor + container_name: tor + restart: always + environment: + LOCAL_USER_ID: 1000 + LOCAL_GROUP_ID: 1000 + ports: + - 12596:12596 \ No newline at end of file diff --git a/nodeapp/docker-compose.yml b/nodeapp/docker-compose.yml index 56e017df..64d3833e 100644 --- a/nodeapp/docker-compose.yml +++ b/nodeapp/docker-compose.yml @@ -1,21 +1,37 @@ version: '3.9' -# Example deployment of a local robosats-client using -# 'latest' tag from docker-hub +# Frontend and node client development orchestration services: - robosats: - image: recksato/robosats-client:latest - container_name: robosats + frontend: + build: ../frontend + container_name: npm-dev + restart: always + command: npm run dev + volumes: + - ../frontend:/usr/src/frontend + - ../mobile:/usr/src/mobile + + nodeapp: + build: . + container_name: nodeapp-dev restart: always environment: TOR_PROXY_IP: 127.0.0.1 TOR_PROXY_PORT: 9050 network_mode: service:tor + volumes: + - ./:/usr/src/robosats/ + - ./nginx.conf:/etc/nginx/nginx.conf + - ../frontend/static:/usr/src/robosats/static + tor: build: ../docker/tor - container_name: tor + container_name: tor-dev restart: always environment: LOCAL_USER_ID: 1000 LOCAL_GROUP_ID: 1000 + volumes: + - ../node/tor/data:/var/lib/tor + - ../node/tor/config:/etc/tor ports: - 12596:12596 \ No newline at end of file diff --git a/nodeapp/nginx.conf b/nodeapp/nginx.conf index 957f2db7..be1ad2f3 100644 --- a/nodeapp/nginx.conf +++ b/nodeapp/nginx.conf @@ -22,6 +22,7 @@ http { location / { root /usr/src/robosats; try_files $uri $uri/ /basic.html; + index basic.html; } location /pro/ { diff --git a/setup.md b/setup.md index bb4a7cb3..4dd331d5 100644 --- a/setup.md +++ b/setup.md @@ -4,16 +4,16 @@ # Frontend Development Only Running the full stack is not easy, since RoboSats needs of many services. However, contributing to the frontend development can be done with a minimal setup! ## With Docker -You can develop frontend-only features using the mainnet backend of the platform by simply running the sorverign node app locally and the `npm-dev` container. The orchestration in `/nodeapp/docker-compose.yml` will run a Tor proxy and torify all requests, as well as, watch for changes to the frontend source files, build it, and place it in the right `/static/` +You can develop frontend-only features using the mainnet backend of the platform by simply running the sovereign node app locally and the `npm-dev` container. The orchestration in `/nodeapp/docker-compose.yml` will run a Tor proxy and torify all requests, as well as, watch for changes to the frontend source files, build it, and place it in the right `/static/` ```bash cd nodeapp -docker-compose -f docker-compose-dev.yml up +docker-compose up # Press Ctrl+C to exit the process -# Check out 127.0.0.1:12596 on your browser +# Check out http://localhost:12596 on your browser ``` -You can edit the frontend code in `/frontend/src/` to make the changes you want. Within a few seconds, the `npm-dev` container process will pack the code into the local `main.js`. Visit `127.0.0.1:12596` and you will see your changes on the frontend. +You can edit the frontend code in `/frontend/src/` to make the changes you want. Within a few seconds, the `npm-dev` container process will pack the code into the local `main.js`. Visit `http://localhost:12596` and you will see your changes on the frontend. ## Without Docker