Infrastructure connection updates

This commit is contained in:
2020-03-04 19:52:28 -05:00
parent 51748d5783
commit aec5364f2e
14 changed files with 48 additions and 21 deletions
+2 -1
View File
@@ -36,5 +36,6 @@ COPY ./faye /usr/src/app
ENV FAYE_PORT=9296
EXPOSE $FAYE_PORT
CMD thin start -R config.ru -p $FAYE_PORT
#CMD thin start -R config.ru -p $FAYE_PORT
CMD thin start -R config.ru -p $FAYE_PORT --ssl --ssl-key-file=ssl/privkey.pem --ssl-cert-file=ssl/fullchain.pem
+10 -2
View File
@@ -2,14 +2,22 @@
# This script rebuilds the whole environment and starts a new container
# 1. ensure this script is run from the project's root, not the faye directory
pwd_dirname=$(basename $(pwd));
script_dirname="faye";
pwd_dirname=$(basename $(pwd))
script_dirname="faye"
certs_dir="/etc/letsencrypt/live/mozo.bar"
#certs_dir="/home/benjamin/mozo/mozo-user/ssl"
if [ "$pwd_dirname" == "$script_dirname" ]; then
echo "PWD DIRNAME: "$pwd_dirname;
echo "You must run this script from the project's root dir (../) for the Dockerfile to have access to the configs to COPY";
exit 1;
fi
if [ -d "$certs_dir" ]; then
echo "Found certificates directory, copy it to local for inclusion in the docker build"
rm -rf $script_dirname/ssl
cp -r $certs_dir $script_dirname/ssl
fi
# 2. stop and remove all running/existing containers
docker rm $(docker stop $(docker ps -a -q --filter ancestor=mozo_faye))