-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DEV: Update docker development binstubs
- Add `d/ember-cli`, and publish port 4200 - Remove `d/sidekiq`. Sidekiq is now started with the rails server - Move all `docker exec` logic into a single place, so we have one place to set environment variable pass-throughs - Use `exec` for all bash scripts, so that return statuses are passed back correctly - Avoid using `bin/bash -c` unnecessarily, because it makes escaping arguments difficult
- Loading branch information
1 parent
ab23412
commit 73050d9
Showing
15 changed files
with
32 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
#!/bin/bash | ||
|
||
PARAMS="$@" | ||
CMD="cd /src && USER=discourse RAILS_ENV=${RAILS_ENV:=development} bundle $PARAMS" | ||
docker exec -it -u discourse:discourse discourse_dev /bin/bash -c "$CMD" | ||
exec "$(dirname "$0")/exec" bundle "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
#!/bin/bash | ||
|
||
PARAMS="$@" | ||
CMD="cd /src && USER=discourse RUBY_GLOBAL_METHOD_CACHE_SIZE=131072 LD_PRELOAD=/usr/lib/libjemalloc.so RAILS_ENV=${RAILS_ENV:=development} script/discourse $PARAMS" | ||
docker exec -it -u discourse:discourse discourse_dev /bin/bash -c "$CMD" | ||
exec "$(dirname "$0")/exec" script/discourse "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
exec "$(dirname "$0")/exec" bin/ember-cli "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
exec docker exec \ | ||
-it \ | ||
-u discourse:discourse \ | ||
-w '/src' \ | ||
-e RUBY_GLOBAL_METHOD_CACHE_SIZE=131072 \ | ||
-e LD_PRELOAD=/usr/lib/libjemalloc.so \ | ||
-e RAILS_ENV \ | ||
-e NO_EMBER_CLI \ | ||
-e QUNIT_RAILS_ENV \ | ||
discourse_dev \ | ||
"$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
#!/bin/bash | ||
|
||
CMD="USER=discourse mailcatcher --http-ip 0.0.0.0 -f" | ||
docker exec -it discourse_dev /bin/bash -c "$CMD" | ||
exec "$(dirname "$0")/exec" mailcatcher --http-ip 0.0.0.0 -f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
CMD="cd /src && USER=discourse RAILS_ENV=development rake db:migrate" | ||
docker exec -it -u discourse:discourse discourse_dev /bin/bash -c "$CMD" | ||
CMD="cd /src && USER=discourse RAILS_ENV=test rake db:migrate" | ||
docker exec -it -u discourse:discourse discourse_dev /bin/bash -c "$CMD" | ||
"$(dirname "$0")/exec" bin/rake db:migrate | ||
RAILS_ENV=test "$(dirname "$0")/exec" bin/rake db:migrate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
#!/bin/bash | ||
|
||
PARAMS="$@" | ||
CMD="USER=discourse psql $PARAMS" | ||
docker exec -it -u postgres discourse_dev /bin/bash -c "$CMD" | ||
exec "$(dirname "$0")/exec" psql "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,3 @@ | ||
#!/bin/bash | ||
|
||
PARAMS="$@" | ||
if [[ $# = 1 ]] && [[ "$1" =~ "s" ]]; | ||
then | ||
PARAMS="$PARAMS -b 0.0.0.0" | ||
fi | ||
|
||
CMD="cd /src && USER=discourse RUBY_GLOBAL_METHOD_CACHE_SIZE=131072 LD_PRELOAD=/usr/lib/libjemalloc.so RACK_HANDLER=puma RAILS_ENV=${RAILS_ENV:=development} rails $PARAMS" | ||
docker exec -it -u discourse:discourse discourse_dev /bin/bash -c "$CMD" | ||
exec "$(dirname "$0")/exec" bin/rails "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
#!/bin/bash | ||
|
||
PARAMS="$@" | ||
CMD="cd /src && USER=discourse RUBY_GLOBAL_METHOD_CACHE_SIZE=131072 LD_PRELOAD=/usr/lib/libjemalloc.so RAILS_ENV=${RAILS_ENV:=development} bundle exec rake $PARAMS" | ||
docker exec -it -u discourse:discourse discourse_dev /bin/bash -c "$CMD" | ||
exec "$(dirname "$0")/exec" bin/rake "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
#!/bin/bash | ||
|
||
PARAMS="$@" | ||
CMD="cd /src && USER=discourse RUBY_GLOBAL_METHOD_CACHE_SIZE=131072 LD_PRELOAD=/usr/lib/libjemalloc.so RAILS_ENV=${RAILS_ENV:=test} bin/rspec $PARAMS" | ||
docker exec -it -u discourse:discourse discourse_dev /bin/bash -c "$CMD" | ||
exec "$(dirname "$0")/exec" bin/rspec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
#!/bin/bash | ||
docker exec -it -u discourse:discourse discourse_dev /bin/bash | ||
|
||
exec "$(dirname "$0")/exec" /bin/bash "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
#!/bin/bash | ||
docker exec -it discourse_dev /bin/bash | ||
|
||
exec docker exec -it discourse_dev /bin/bash |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,3 @@ | ||
#!/bin/bash | ||
|
||
PARAMS="$@" | ||
if [[ $# = 1 ]] && [[ "$1" =~ "s" ]]; | ||
then | ||
PARAMS="$PARAMS -b 0.0.0.0" | ||
fi | ||
|
||
CMD="cd /src && USER=discourse RUBY_GLOBAL_METHOD_CACHE_SIZE=131072 LD_PRELOAD=/usr/lib/libjemalloc.so RAILS_ENV=${RAILS_ENV:=development} bin/unicorn $PARAMS" | ||
docker exec -it -u discourse:discourse discourse_dev /bin/bash -c "$CMD" | ||
exec "$(dirname "$0")/exec" bin/unicorn "$@" |