fresh2dev / ShinyStudio

A fully Dockerized, self-hosted development environment for teams. Develop where you serve.
https://hub.docker.com/r/dm3ll3n/shinystudio
MIT License
242 stars 40 forks source link

Stack minimal setup not working as expected #18

Closed gacolitti closed 4 years ago

gacolitti commented 4 years ago

I'm following the "Getting started" stack section on a Windows machine running docker desktop.

I run the minimal setup below in powershell:

cd "C:\Users\user\Desktop"

# copy the setup files.
git clone https://github.com/dm3ll3n/ShinyStudio

# enter the directory.
cd ShinyStudio

# run certify to generate self-signed cert.
./certify.ps1

And I receive the following output to the console:

git : Cloning into 'ShinyStudio'...
At C:\Users\gcolitti\Documents\powershell\shinystudio-stack-build.ps1:4 char:1
+ git clone https://github.com/dm3ll3n/ShinyStudio
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Cloning into 'ShinyStudio'...:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

docker-compose : Creating network "shinystudio_default" with the default driver
At C:\Users\gcolitti\ShinyStudio\certify.ps1:9 char:5
+     docker-compose run --rm --entrypoint "/bin/sh -c" certbot $cmd.Re ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Creating networ... default driver:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
v3.12.0-166-g8085a3b70a [http://dl-cdn.alpinelinux.org/alpine/v3.12/main]
v3.12.0-165-g0169509cb9 [http://dl-cdn.alpinelinux.org/alpine/v3.12/community]
OK: 12751 distinct packages available
(1/3) Installing nghttp2-libs (1.41.0-r0)
7  0%                                             8(2/3) Installing libcurl (7.69.1-r0)
7 18% ████████                                    8(3/3) Installing curl (7.69.1-r0)
7 72% ████████████████████████████████            871
00% ████████████████████████████████████████
████8Executing busybox-1.31.1-r16.trigger
OK: 24 MiB in 43 packages
Generating a RSA private key
......+++++
...........+++++
writing new private key to '/etc/letsencrypt/live/example.com/privkey.pem'
-----
docker-compose : Creating shinystudio_nginx_1 ... 
At C:\Users\gcolitti\ShinyStudio\certify.ps1:58 char:1
+ docker-compose up -d --no-recreate
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Creating shinystudio_nginx_1 ... :String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

Creating shinystudio_certbot_1 ... 
Creating shinystudio_influxdb_1 ... 
Creating shinystudio_influxdb_1 ... done
Creating shinystudio_shinystudio_1 ... 
Creating shinystudio_certbot_1     ... done
Creating shinystudio_nginx_1       ... done
Creating shinystudio_shinystudio_1 ... done
docker-compose : Error response from daemon: Container f5d40221f43e314a878148dc70bfe2d3e1ad1bf2356dd43ddd9ddeaf18cdb2cb is 
restarting, wait until the container is running
At C:\Users\gcolitti\ShinyStudio\certify.ps1:60 char:1
+ docker-compose exec nginx nginx -s reload
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Error response ...iner is running:String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError

If I run docker ps I get:

CONTAINER ID        IMAGE                     COMMAND                  CREATED             STATUS                         PORTS               NAMES
6f6193820ea5        shinystudio_shinystudio   "/start.sh shinyproxy"   13 seconds ago      Up 12 seconds                  8787/tcp            shinystudio_shinystudio_1
d0b80000b127        nginx                     "/docker-entrypoint.…"   13 seconds ago      Restarting (1) 4 seconds ago                       shinystudio_nginx_1
2444d3138fdb        certbot/certbot           "/bin/sh -c 'trap ex…"   13 seconds ago      Up 13 seconds                  80/tcp, 443/tcp     shinystudio_certbot_1
8829699fba12        influxdb                  "/entrypoint.sh infl…"   7 minutes ago       Up 13 seconds                  8086/tcp            shinystudio_influxdb_1

And if I go to http://localhost/ I get "Site cannot be reached".

gacolitti commented 4 years ago

The issue was two-fold in my case. The links appear to be incorrect as indicated by #15 and the rsa key size needed to be increased in the certify script.

For more on rsa key size see: https://github.com/jfromaniello/selfsigned/issues/33.