Research and Development: Peer discovery, Onion routing, Hidden service, Rondevu points over UDP
KEYS=VALUES
docker build --tag xxx:0.0.1 .
docker build --tag xxx:0.0.1 --no-cache .
docker network create --driver overlay --attachable --subnet=172.18.0.0/16 onion-routing-udp
if you have docker desktop running, you can develop locally inside the container.
# rsync local to master swarm node
rsync -azP --delete . <user>@<host>:~/vol/onion-routing-udp/_data
# goto app
cd <to app directory>
# run app with docker run from current app directory
docker run -dit --rm --mount type=bind,source="$(pwd)",target=/data node bash -c "cd /data && npm run start"
docker run -dit --rm --mount type=bind,source="$(pwd)",target=/data node bash -c "cd /data && npm run start:dev"
docker run -it --rm --mount type=bind,source="$(pwd)",target=/data node bash -c "cd /data && npm run start:dev"
# exporting host ports, watch firewall
docker run -it --rm -v onion-routing-udp:/data -p 42069:42069/udp -e LISTENPORT=42069 node bash -c "cd /data && npm run start:dev"
docker run -it --rm -v onion-routing-udp:/data -p 42070:42070/udp -e LISTENPORT=42070 node bash -c "cd /data && npm run start:dev"
docker run -it --rm -v onion-routing-udp:/data -p 42071:42071/udp -e LISTENPORT=42071 node bash -c "cd /data && npm run start:dev"
# with network and static ip ??? breaks ???
docker run -it --rm --mount type=bind,source="$(pwd)",target=/data --net onion-routing-udp --ip 172.18.0.2 node bash -c "cd /data && npm run start:dev"
docker service create --mount type=bind,source="$(pwd)",target=/data node bash -c "cd /data && npm run start:dev"
$ npm install
$ npm run build
npx protoc --ts_out protos --proto_path protos protos/xxx.proto
# development
$ npm run start
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod