docbrown/scripts/bundle.sh
Joe Doss 44569605d2
Fix container composes w/r/t multistage container builds (#11531)
* Use premade development image.

* Use prebuilt container for podman-compose too!

* Fix bundle bundle_finished path.

* Fix docker-compose to work with the Multistage Containerfile

Add root user for Forem containers, fix bundle_finished path and make
webpacker wait for the bundle to finish.

Switch Redis to redis:6.0.9-alpine

* Remove build steps and fix bundle path.

* Merge dev entrypoint into the main one.

* Use merged entrypoint.sh, remove old entrypoint directives, and fix a dockerize bug.

* Make sure unset BUNDLE_WITHOUT and remove without in bundle config.

* Unset BUNDLE_WITHOUT="development:test" as a global ENV.

Also ensure that we remove the without directives for development and testing.
This will make sure that the right gems are installed for each environment.

Removed some unneeded COPYs and remove a commented out RUN.

* Fix ENTRYPOINT on development and testing containers.

* Fix entrypoint and command on rails container.

* Ignore bundle_finished file.

* Fix REDIS_ env vars and adjust podman-compose file.

* Change bundle_finished path and update Yarn docker-compose command.
2020-11-23 15:15:21 -06:00

12 lines
344 B
Bash
Executable file

#!/usr/bin/env bash
set -e
if [ -f /opt/apps/forem/vendor/bundle/.bundle_finished ]; then
rm -f /opt/apps/forem/vendor/bundle/.bundle_finished
fi
unset BUNDLE_WITHOUT
bundle config --delete without
bundle install --local --jobs 20 --retry 5 --path vendor/bundle
echo $(date --utc +%FT%T%Z) > /opt/apps/forem/vendor/bundle/.bundle_finished