1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

Added some extra automation for dev container and fixed deploy test. Deploy test needs devise and rails secrets since it runs in prod

This commit is contained in:
2019-11-26 15:03:01 -05:00
parent 515ea6bb8d
commit 2f4ea5e42f
4 changed files with 16 additions and 2 deletions

View File

@@ -1,10 +1,15 @@
#!/bin/bash -e
project_dir="$(dirname $( dirname $(readlink -f ${BASH_SOURCE[0]})))"
USER_ID=$(id -u ${USER})
# Get group id for username
GROUP_ID=$(cut -d: -f3 < <(getent group ${USER}))
if [ $# != 1 ]; then
echo "Please enter docker image name for the rails development environment"
exit 1
fi
docker build -t $1 -f ${project_dir}/deploy/rails-dev-Dockerfile ${project_dir}
docker run -it -p 3000:3000 -v ${project_dir}:/rails $1 /bin/bash
docker run -it -p 3000:3000 -v ${project_dir}:/rails $1 /bin/bash
sudo chown -R ${USER}:${USER} ${project_dir}