New versions

This commit is contained in:
2022-01-27 09:32:01 -05:00
parent cf7f5d0f16
commit 0e917ccdb4
8 changed files with 221 additions and 183 deletions
+5 -1
View File
@@ -33,9 +33,13 @@ COPY faye/Gemfile /usr/src/app/
RUN bundle install
COPY ./faye /usr/src/app
RUN cp /usr/src/app/ssl/rootCA.pem /etc/ssl/certs/mozo-ssl-rootCA.pem
RUN cp /usr/src/app/ssl/fullchain.pem /etc/ssl/certs/mozo-ssl-fullchain.pem
RUN update-ca-certificates
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
CMD thin start -R config.ru -p $FAYE_PORT --ssl --ssl-disable-verify
#CMD thin start -R config.ru -p $FAYE_PORT --ssl --ssl-disable-verify --ssl-key-file=ssl/privkey.pem --ssl-cert-file=ssl/fullchain.pem
+28 -25
View File
@@ -1,46 +1,46 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.3.7)
coderay (1.1.0)
cookiejar (0.3.2)
daemons (1.1.9)
em-http-request (1.1.2)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
coderay (1.1.3)
cookiejar (0.3.3)
daemons (1.3.1)
em-http-request (1.1.7)
addressable (>= 2.3.4)
cookiejar
cookiejar (!= 0.3.1)
em-socksify (>= 0.3)
eventmachine (>= 1.0.3)
http_parser.rb (>= 0.6.0)
em-socksify (0.3.0)
em-socksify (0.3.2)
eventmachine (>= 1.0.0.beta.4)
eventmachine (1.0.7)
faye (1.1.0)
eventmachine (1.2.7)
faye (1.4.0)
cookiejar (>= 0.3.0)
em-http-request (>= 0.3.0)
em-http-request (>= 1.1.6)
eventmachine (>= 0.12.0)
faye-websocket (>= 0.9.1)
faye-websocket (>= 0.11.0)
multi_json (>= 1.0.0)
rack (>= 1.0.0)
websocket-driver (>= 0.5.1)
faye-websocket (0.9.2)
faye-websocket (0.11.0)
eventmachine (>= 0.12.0)
websocket-driver (>= 0.5.1)
http_parser.rb (0.6.0)
method_source (0.8.2)
multi_json (1.10.1)
pry (0.10.1)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
rack (1.6.0)
slop (3.6.0)
thin (1.6.3)
method_source (1.0.0)
multi_json (1.15.0)
pry (0.14.1)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (4.0.6)
rack (2.2.3)
thin (1.8.0)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0)
rack (~> 1.0)
websocket-driver (0.5.1)
eventmachine (~> 1.0, >= 1.0.4)
rack (>= 1, < 3)
websocket-driver (0.7.3)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.1)
websocket-extensions (0.1.5)
PLATFORMS
ruby
@@ -49,3 +49,6 @@ DEPENDENCIES
faye
pry
thin
BUNDLED WITH
2.1.4
+11 -5
View File
@@ -5,8 +5,11 @@
pwd_dirname=$(basename $(pwd))
script_dirname="faye"
arch=$(uname)
#1certs_dir="/etc/letsencrypt/live/mozo.bar"
certs_dir="/Users/bj/Library/Application Support/mkcert"
if [ $arch == "Darwin" ]; then
certs_dir="/Users/bj/Library/Application Support/mkcert"
else
certs_dir="/etc/letsencrypt/live/mozo.bar"
fi
#certs_dir="/home/benjamin/mozo/mozo-user/ssl"
if [ "$pwd_dirname" == "$script_dirname" ]; then
echo "PWD DIRNAME: "$pwd_dirname;
@@ -17,17 +20,20 @@ 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
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
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"
mkdir $script_dirname/ssl
cp "$certs_dir/localhost-key.pem" $script_dirname/ssl/privkey.pem
cp "$certs_dir/localhost.pem" $script_dirname/ssl/fullchain.pem
cp "$certs_dir/rootCA-key.pem" $script_dirname/ssl/rootCA-key.pem
cp "$certs_dir/rootCA.pem" $script_dirname/ssl/rootCA.pem
#cp -r "$certs_dir" "$script_dirname/ssl"
else
echo "Using letsencrypt folder copy"
# copy full directory, assuming letsencrypt
cp -rL $certs_dir $script_dirname/ssl
cp -rL "$certs_dir" "$script_dirname/ssl"
fi
else
echo "Certs dir not found at: $certs_dir"
@@ -48,7 +54,7 @@ docker build -f faye/Dockerfile -t mozo_faye .
# 5. Spin up the counter container from the generated image
if [ $arch == "Darwin" ]; then
echo "Running the created image using the Mac Darwin port exposing"
docker run -p 9296:9296 --restart unless-stopped --detach --name=mozo_faye mozo_faye
#docker run -p 9296:9296 --restart unless-stopped --detach --name=mozo_faye mozo_faye
else
echo "Running the created image using network=host"
docker run --network=host --restart unless-stopped --detach --name=mozo_faye mozo_faye