diff --git a/Makefile b/Makefile index 02541ab512..f63a39ceda 100644 --- a/Makefile +++ b/Makefile @@ -56,7 +56,6 @@ bin: ${OPTS} go build -o ./therealssh-cli ./cmd/therealssh-cli # Dockerized skywire-node - docker-image: docker image build --tag=skywire-runner --rm - < skywire-runner.Dockerfile @@ -78,28 +77,28 @@ docker-apps: docker-bin: ${DOCKER_OPTS} go build -o ./node/skywire-node ./cmd/skywire-node - docker-volume: docker-apps docker-bin bin ./skywire-cli config ./node/skywire.json docker-run: docker-clean docker-image docker-network docker-volume + docker run -it -v $(shell pwd)/node:/sky --network=${DOCKER_NETWORK} \ + --name=${DOCKER_NODE} ${DOCKER_IMAGE} bash -c "cd /sky && ./skywire-node" + +docker-run-daemon: docker-clean docker-image docker-network docker-volume docker run -d -v $(shell pwd)/node:/sky --network=${DOCKER_NETWORK} \ --name=${DOCKER_NODE} ${DOCKER_IMAGE} bash -c "cd /sky && ./skywire-node" docker-stop: -docker container stop ${DOCKER_NODE} -docker-refresh: docker-stop docker-bin - docker container start ${DOCKER_NODE} # skywire-node on host - run: stop build + ./skywire-node + +run-daemon: stop build ./skywire-node &>/dev/null & stop: -bash -c "kill $$(ps aux |grep '[s]kywire-node' |awk '{print $$2}')" -refresh: stop - ${OPTS} go build -o ./skywire-node ./cmd/skywire-node - ./skywire-node &>/dev/null & \ No newline at end of file diff --git a/README.md b/README.md index c37b928a05..ec5d7ca02e 100644 --- a/README.md +++ b/README.md @@ -364,7 +364,7 @@ Idea of test from Erlang classics: https://youtu.be/uKfKtXYLG78?t=120 ```bash # Setup: run skywire-nodes on host and in docker -$ make docker-run && make run +$ make docker-run-daemon && make run-daemon # Open in browser chat application $ firefox http://$SW_NODE_B:8000 & # add transport