Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Share/Expose options and cleanup on exit #168

Merged
merged 1 commit into from
Jun 24, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions bin/sail
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ export APP_SERVICE=${APP_SERVICE:-"laravel.test"}
export DB_PORT=${DB_PORT:-3306}
export WWWUSER=${WWWUSER:-$UID}
export WWWGROUP=${WWWGROUP:-$(id -g)}
export SHARE_DASHBOARD=${SHARE_DASHBOARD:-4040}
export SHARE_SERVER_HOST=${SHARE_SERVER_HOST:-"laravel-sail.site"}
export SHARE_SERVER_PORT=${SHARE_SERVER_PORT:-8080}

if [ "$MACHINE" == "linux" ]; then
export SEDCMD="sed -i"
Expand Down Expand Up @@ -306,9 +309,10 @@ if [ $# -gt 0 ]; then
shift 1

if [ "$EXEC" == "yes" ]; then
docker run --init beyondcodegmbh/expose-server:latest share http://host.docker.internal:"$APP_PORT" \
--server-host=laravel-sail.site \
--server-port=8080 \
docker run --init --rm -p $SHARE_DASHBOARD:4040 beyondcodegmbh/expose-server:latest share http://host.docker.internal:"$APP_PORT" \
--server-host="$SHARE_SERVER_HOST" \
--server-port="$SHARE_SERVER_PORT" \
--auth="$SHARE_TOKEN" \
"$@"
else
sail_is_not_running
Expand Down