AVGP / cloud9hub

A workspace dashboard for Cloud9
97 stars 47 forks source link

Installation, bower and missing dependencies #14

Open tntodorov opened 9 years ago

tntodorov commented 9 years ago

Hello,

This practically reopens closed issues #8 and #9.

In the case of #8, yes - you caught it first ;-) But then fixed it at the wrong place. C9 does not have a bower.json file, and that is where you added the lines. More problematic is that the script attempts to install bower globally, which might not happen, if node.js is installed globally for all users, i.e. somewhere outside of your $HOME. bower complains if you run the script with sudo, unless you also add --allow-root. This is all I have on issue #8.

Issue #9. Bower starts the installation, but fails to find flat-ui-official. Here is the output:

ttodorov@cloud:~/work/cloud9hub$ bower install bower not-cached git://github.com/angular/bower-angular.git#~1.2.15 bower resolve git://github.com/angular/bower-angular.git#~1.2.15 bower not-cached git://github.com/angular/bower-angular-route.git#~1.2.15 bower resolve git://github.com/angular/bower-angular-route.git#~1.2.15 bower not-cached git://github.com/FortAwesome/Font-Awesome.git#~4.0.3 bower resolve git://github.com/FortAwesome/Font-Awesome.git#~4.0.3 bower not-cached git://github.com/topcoat/topcoat.git#~0.8.0 bower resolve git://github.com/topcoat/topcoat.git#~0.8.0 bower download https://github.com/FortAwesome/Font-Awesome/archive/v4.0.3.tar.gz bower download https://github.com/angular/bower-angular/archive/v1.2.26.tar.gz bower download https://github.com/angular/bower-angular-route/archive/v1.2.26.tar.gz bower download https://github.com/topcoat/topcoat/archive/v0.8.0.tar.gz bower extract angular-route#~1.2.15 archive.tar.gz bower invalid-meta angular-route is missing "ignore" entry in bower.json bower resolved git://github.com/angular/bower-angular-route.git#1.2.26 bower extract angular#~1.2.15 archive.tar.gz bower invalid-meta angular is missing "ignore" entry in bower.json bower resolved git://github.com/angular/bower-angular.git#1.2.26 bower extract fontawesome#~4.0.3 archive.tar.gz bower extract topcoat#~0.8.0 archive.tar.gz bower invalid-meta topcoat is missing "main" entry in bower.json bower invalid-meta topcoat is missing "ignore" entry in bower.json bower resolved git://github.com/topcoat/topcoat.git#0.8.0 bower invalid-meta fontawesome is missing "main" entry in bower.json bower invalid-meta fontawesome is missing "ignore" entry in bower.json bower resolved git://github.com/FortAwesome/Font-Awesome.git#4.0.3 bower ENOTFOUND Package flat-ui-official not found

tntodorov commented 9 years ago

Sorry, I was distracted and posted the new issue before completing my description...

Anyway, because of flat-ui-official bower stops the install. If I remove flat-ui from the json file, the rest of the dependencies are installed and I get a lot less 404s in the log. At least I can create or delete a workspace, even when there is no styling to the the html.

And a last issue which concerns the installation, but is not related to the old ones #8 and #9: Is there a way to run this behind forward proxy like nginx? I tried to set this up with the following setup in ngxinx:

    upstream c9_upstream {
        server 127.0.0.1:3105;
        server 127.0.0.1:5000;
    }

    server {
        listen 443;
        ssl on;
       # other ssl configuration
        location / {
            # usual proxy configuration for node.js, google is your friend
            proxy_pass http://c9_upstream;
        }
    }

For that to work, I also had to change server.js where passport.js is setup for GitHubStrategy:

    //callbackURL: app.get('baseUrl') + ':' + app.get('port') + '/auth/github/callback'
    callbackURL: app.get('baseUrl') +  '/auth/github/callback'

so the redirect would work. I was able to login, create a test workspace, but starting the workspace timed out. The log did not show any message beyond starting c9. Is it possible for this setup to work behind nginx as a proxy? What I am going for is actually not having to open more ports on my server....

Thanks and best regards,

tntodorov

tntodorov commented 9 years ago

This is what it looks like without the flat-ui (and without the proxy)...

cloud9hub

Ventajou commented 9 years ago

You can get the UI back by installing flat-ui with bower and then altering the views under views/includes as such:

In header.html:

    <!-- Loading Bootstrap -->
    <link href="/lib/flat-ui/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
    <!-- Loading Flat UI -->
    <link href="/lib/flat-ui/dist/css/flat-ui.min.css" rel="stylesheet">

And in footer.html:

<script src="/lib/flat-ui/dist/js/vendor/jquery.min.js"></script>
<script src="/lib/flat-ui/dist/js/vendor/respond.min.js"></script>
<script src="/lib/flat-ui/dist/js/flat-ui.min.js"></script>