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 3edf149e..00000000 Binary files a/frontend/static/assets/misc/unknown_avatar.png and /dev/null differ 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