Skip to content

Commit

Permalink
Changes:
Browse files Browse the repository at this point in the history
1. Added pairs of run-goals:
 - `run`, `docker-run`
 - `run-daemon`, `docker-run-daemon` - starts in "detached" state
2. Removed goals: `make refresh`, `make docker-refresh`
3. Edited README.md accordingly to changes
  • Loading branch information
ayuryshev committed Mar 20, 2019
1 parent 9311dbb commit 8f0c463
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
15 changes: 7 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 &
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8f0c463

Please sign in to comment.