diff --git a/CHANGELOG.md b/CHANGELOG.md index c6480118d..543007354 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Prevent the worker from crashing if OpenLab is not reachable in dev - Allow setting multiple themes for a single event - Increased the width of the input field for the prices of the events +- Script to run a rails command with ease in production (`run.fab.mn`) - Fix a bug: invalid currency in notifications for locales with region (eg. fr-CM) - Fix a bug: the notification sent to the project author when a collaborator has confirmed his participation is not sent - Fix a bug: the event themes are not kept when editing the event again diff --git a/scripts/run.sh b/scripts/run.sh new file mode 100755 index 000000000..465f11c41 --- /dev/null +++ b/scripts/run.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +yq() { + docker run --rm -i -v "${PWD}:/workdir" mikefarah/yq:4 "$@" +} + +config() { + SERVICE="$(yq eval '.services.*.image | select(. == "sleede/fab-manager*") | path | .[-2]' docker-compose.yml)" +} + +run() +{ + config + docker-compose exec "$SERVICE" bundle exec rails "${@:-c}" +} + +run "$@"