Add a script for running a server

In addition to following the 'script to rule them all' pattern, this
makes it easier to bring up a rails server by abstracting all the docker
things away (of which there are quite a few) and will prevent changes to
the binstubs from being able to run a server for development purposes.
This commit is contained in:
Matt Rogers 2018-07-21 10:21:54 -05:00
parent 36e29b82c8
commit e4e6b78f91
No known key found for this signature in database
GPG key ID: 605D017C07EB4316

7
script/server Executable file
View 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