Darwin fixes
This commit is contained in:
@@ -36,6 +36,7 @@ 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 --ssl --ssl-key-file=ssl/privkey.pem --ssl-cert-file=ssl/fullchain.pem
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
# 1. ensure this script is run from the project's root, not the faye directory
|
||||
pwd_dirname=$(basename $(pwd))
|
||||
script_dirname="faye"
|
||||
arch=$(uname)
|
||||
#1certs_dir="/etc/letsencrypt/live/mozo.bar"
|
||||
certs_dir="/Users/bj/Library/Application Support/mkcert"
|
||||
#certs_dir="/home/benjamin/mozo/mozo-user/ssl"
|
||||
@@ -18,8 +19,9 @@ if [ -d "$certs_dir" ]; then
|
||||
rm -rf $script_dirname/ssl
|
||||
mkdir $script_dirname/ssl
|
||||
# Note the -L option for copy is required, since the target are symbolic links and we want the real files
|
||||
if [ -f "$certs_dir/localhost-key.pem" ]; then
|
||||
echo "Using localhost certificate copy https://medium.com/@matayoshi.mariano/how-to-add-ssl-to-your-localhost-with-puma-37a66a649f29"
|
||||
#if [ -f "$certs_dir/localhost-key.pem" ]; then
|
||||
if [ $arch == "Darwin" ]; then
|
||||
echo "Using Darwin localhost certificate copy https://medium.com/@matayoshi.mariano/how-to-add-ssl-to-your-localhost-with-puma-37a66a649f29"
|
||||
cp "$certs_dir/localhost-key.pem" $script_dirname/ssl/privkey.pem
|
||||
cp "$certs_dir/localhost.pem" $script_dirname/ssl/fullchain.pem
|
||||
else
|
||||
@@ -44,7 +46,11 @@ docker build -f faye/Dockerfile -t mozo_faye .
|
||||
# docker run -t -i --rm mozo_faye bash
|
||||
|
||||
# 5. Spin up the counter container from the generated image
|
||||
docker run --network=host --restart unless-stopped --detach --name=mozo_faye mozo_faye
|
||||
if [ $arch == "Darwin" ]; then
|
||||
docker run -p 9296:9296 --restart unless-stopped --detach --name=mozo_faye mozo_faye
|
||||
else
|
||||
docker run --network=host --restart unless-stopped --detach --name=mozo_faye mozo_faye
|
||||
fi
|
||||
|
||||
# To just start the container created through al these steps without rebuilding them:
|
||||
# docker container start $(docker ps -a -q --filter ancestor=mozo_faye)
|
||||
|
||||
Reference in New Issue
Block a user