mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-18 00:00:12 +01:00
Merge pull request #2111 from TracksApp/use-scripts-for-more-operations
Remove some friction when running in development
This commit is contained in:
commit
3059a273a4
3 changed files with 16 additions and 1 deletions
7
script/console
Executable file
7
script/console
Executable file
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
appdir=$(cd $(dirname "$0")/.. && pwd)
|
||||||
|
[ -f /etc/app-env ] || exec "$appdir/script/docker-environment" $0 $@
|
||||||
|
|
||||||
|
export RAILS_ENV='development'
|
||||||
|
bin/rails console
|
||||||
|
|
@ -13,4 +13,5 @@ cmd="$@"; [ "$#" -eq 0 ] && cmd=bash
|
||||||
export VOLUME="$appdir:/app"
|
export VOLUME="$appdir:/app"
|
||||||
image=${DOCKER_IMAGE:=web}
|
image=${DOCKER_IMAGE:=web}
|
||||||
|
|
||||||
exec docker-compose run --rm $image $cmd
|
port_publish=""; [ "${BIND_DOCKER_SERVICE_PORTS:-}" = 1 ] && port_publish="--service-ports"
|
||||||
|
exec docker-compose run $port_publish --rm $image $cmd
|
||||||
|
|
|
||||||
7
script/server
Executable file
7
script/server
Executable file
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
export BIND_DOCKER_SERVICE_PORTS=1
|
||||||
|
appdir=$(cd $(dirname "$0")/.. && pwd)
|
||||||
|
[ -f /etc/app-env ] || exec "$appdir/script/docker-environment" $0 $@
|
||||||
|
|
||||||
|
bin/rails server -b 0.0.0.0
|
||||||
Loading…
Add table
Add a link
Reference in a new issue