diff --git a/nodeapp/docker-compose-dev.yml b/nodeapp/docker-compose-dev.yml new file mode 100644 index 00000000..700d7bfa --- /dev/null +++ b/nodeapp/docker-compose-dev.yml @@ -0,0 +1,35 @@ +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 + ROBOSATS_ONION: robosats6tkf3eva7x2voqso3a5wcorsnw34jveyxfqi2fu7oyheasid.onion + network_mode: service:tor + volumes: + - ../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.yml b/nodeapp/docker-compose.yml index c0fbed68..339dae1a 100644 --- a/nodeapp/docker-compose.yml +++ b/nodeapp/docker-compose.yml @@ -1,34 +1,22 @@ version: '3.9' +# Example deployment of a local robosats-client using +# 'latest' tag from docker-hub services: - frontend: - build: ../frontend - container_name: npm-dev - restart: always - command: npm run dev - volumes: - - ../frontend:/usr/src/frontend - - nodeapp: - build: . - container_name: nodeapp-dev + robosats: + image: recksato/robosats-client:latest + container_name: robosats restart: always environment: TOR_PROXY_IP: 127.0.0.1 TOR_PROXY_PORT: 9050 ROBOSATS_ONION: robosats6tkf3eva7x2voqso3a5wcorsnw34jveyxfqi2fu7oyheasid.onion network_mode: service:tor - volumes: - - ../frontend/static:/usr/src/robosats/static - tor: build: ../docker/tor - container_name: tor-dev + container_name: tor 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/setup.md b/setup.md index cc72603e..e2a9715e 100644 --- a/setup.md +++ b/setup.md @@ -1,5 +1,5 @@ # Set up -*Attention: to use RoboSats you do not need to run the stack, simply visit the website and that's it! This setup guide is intended for developer contributors and platform operators.* +*Attention: to use RoboSats you do not need to run the stack, simply visit the website and that's it! This setup guide is intended for developer contributors and coordinator operators.* # 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! @@ -8,9 +8,9 @@ You can develop frontend-only features using the mainnet backend of the platform ```bash cd nodeapp -docker-compose up +docker-compose -f docker-compose-dev.yml up # Press Ctrl+C to exit the process -# Visit 127.0.0.1:12596 +# Check out 127.0.0.1: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.