Skip to content

Commit

Permalink
fix dev env helper's network setting
Browse files Browse the repository at this point in the history
  • Loading branch information
ety001 committed Dec 4, 2023
1 parent f0a3d88 commit 79f573e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions dev_env.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#/bin/bash

set -xe

container_name=dev-hivemind-env

run() {
Expand All @@ -10,16 +12,16 @@ run() {
tag=dev-env
fi

if [ -n ${network} ]; then
network_str="--network ${network}"
if [ "${network}" = "" ]; then
network=bridge
fi

docker run -it --rm \
docker run -itd --rm \
--name ${container_name} \
-v $(pwd):/project \
--env-file $(pwd)/.env \
--workdir /project \
${network_str} \
--network ${network} \
steemit/hivemind:${tag} \
/bin/bash
}
Expand All @@ -40,6 +42,7 @@ main_func() {
case ${op} in
run)
run $tag $network
cli
;;
cli)
cli
Expand Down

0 comments on commit 79f573e

Please sign in to comment.