1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-02 04:35:26 +00:00
Files
wrestlingdev.com/rails-worker-prod.sh

13 lines
398 B
Bash
Executable File

#!/bin/bash -e
docker pull ruby:2.2.3
if [ $# != 1 ]; then
echo "Please enter docker image name for the rails development environment"
exit 1
fi
docker build -t $1 -f rails-prod-Dockerfile .
docker kill $(docker ps -q)
docker run -h $HOSTNAME --name $1 -d --restart=always --env-file $WRESTLINGDEV_ENV_FILE -v /etc/localtime:/etc/localtime $1 bundle exec rake jobs:work RAILS_ENV=production