diff --git a/rails-prod.sh b/rails-prod.sh index 503b4db..c04efd0 100755 --- a/rails-prod.sh +++ b/rails-prod.sh @@ -5,7 +5,8 @@ if [ $# != 1 ]; then exit 1 fi -docker build -t $1 -f rails-prod-Dockerfile . docker kill $1 docker rm $1 +docker build -t $1 -f rails-prod-Dockerfile . + docker run --name $1 -d --restart=always --env-file $WRESTLINGDEV_ENV_FILE -p 80:80 -p 443:443 $1 diff --git a/rails-worker-prod.sh b/rails-worker-prod.sh index 7a71c13..3c77bdf 100755 --- a/rails-worker-prod.sh +++ b/rails-worker-prod.sh @@ -5,7 +5,8 @@ if [ $# != 1 ]; then exit 1 fi -docker build -t $1 -f rails-prod-Dockerfile . docker kill $1 docker rm $1 +docker build -t $1 -f rails-prod-Dockerfile . + docker run --name $1 -d --restart=always --env-file $WRESTLINGDEV_ENV_FILE $1 bundle exec rake jobs:work RAILS_ENV=production \ No newline at end of file