Skip to content

Instantly share code, notes, and snippets.

@jsperezg
Created January 24, 2018 11:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jsperezg/a3995d69bc967dd3ca4e96980d00bbf2 to your computer and use it in GitHub Desktop.
Save jsperezg/a3995d69bc967dd3ca4e96980d00bbf2 to your computer and use it in GitHub Desktop.
docker-compose entry point for Decidim projects
#!/bin/sh -x
# https://github.com/docker-library/ruby/issues/66
export BUNDLE_PATH=$GEM_HOME
export BUNDLE_BIN=$GEM_HOME/bin
export BUNDLE_APP_CONFIG=$GEM_HOME/config
export USER_UID=`stat -c %u /code/Gemfile`
export USER_GID=`stat -c %g /code/Gemfile`
usermod -u $USER_UID decidim 2> /dev/null
groupmod -g $USER_GID decidim 2> /dev/null
usermod -g $USER_GID decidim 2> /dev/null
chown -R -h $USER_UID $GEM_HOME 2> /dev/null
chgrp -R -h $USER_GID $GEM_HOME 2> /dev/null
/usr/bin/sudo -EH -u decidim "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment