Files
grecia/scripts/entrypoint.sh
Juan Salvador Pérez García 8161045009 Docker/docker-compose enhancements
The following enhancements have been made to docker/docker-compose

* Fixed bug when building the image.
* docker-compose up starts the server
* Scaffolding inside the container respect the ownership of the files
outside it
* Volumes are tagged as 'delegated' in order to improve performance for
mac/windoze users.
* bundler stores packages in a volume. This whay new packages can be
added without rebuilding the image:

```bash
docker-compose run app bundle install
```
2018-06-01 15:51:06 +02:00

18 lines
386 B
Bash
Executable File

#!/bin/sh -x
USER_UID=$(stat -c %u /var/www/consul/Gemfile)
USER_GID=$(stat -c %g /var/www/consul/Gemfile)
export USER_UID
export USER_GID
usermod -u "$USER_UID" consul 2> /dev/null
groupmod -g "$USER_GID" consul 2> /dev/null
usermod -g "$USER_GID" consul 2> /dev/null
chown -R -h "$USER_UID" "$BUNDLE_PATH"
chgrp -R -h "$USER_GID" "$BUNDLE_PATH"
/usr/bin/sudo -EH -u consul "$@"