hummingbird-me / kitsu-tools

:hammer: The tools we use to build Kitsu, the coolest platform for anime and manga
https://kitsu.app
Apache License 2.0
2.09k stars 264 forks source link

Docker support for the future version #682

Closed MiLk closed 9 years ago

MiLk commented 9 years ago

Fixes #654

SSH Key

You need to add a ssh key which can access this repo: https://github.com/hummingbird-me/foundation-sites-6 Reuse an existing key, or create a new key that you will use only for github, and save it in github_key in the project's root directory It will be copied inside your docker container.

General instructions

docker-compose build
docker-compose up web

Linux

xdg-open "http://localhost:3000"
xdg-open "http://localhost:$(docker-compose port web 4200 | cut -d':' -f2)"

OSX

open "http://$(docker-machine ip docker-machine-dev):3000"
open "http://$(docker-machine ip docker-machine-dev):$(docker-compose port web 4200 | cut -d':' -f2)"
trmcnvn commented 9 years ago

Ran into an issue with the installation of node-sass.

Error: The `libsass` binding was not found in /opt/hummingbird/client/node_modules/ember-cli-sass/node_modules/broccoli-sass-source-maps/node_modules/node-sass/vendor/linux-x64-14/binding.node
This usually happens because your node version has changed.
Run `npm rebuild node-sass` to build the binding for your current node version.

Phantomjs 2.0 should also be installed for running the emberjs tests.

MiLk commented 9 years ago

Did you install the dependencies on your system before? Try to remove all the node_modules directory and try again.

trmcnvn commented 9 years ago

Yep, that & not using VirtualBox 5.0.4 (due to a symlink bug) worked.

MiLk commented 9 years ago

More work required on this one? poke @JoshFabian @NuckChorris

trmcnvn commented 9 years ago

:+1: from me, Will wait for @NuckChorris to sign off also.

NuckChorris commented 9 years ago

What about the build? It can't find JJ Abrams

trmcnvn commented 9 years ago

Will need to rebase against master to fix that specific fail, ESA released 1.0 and deleted that branch.

PRs are failing ATM due to Travis not exposing secure environment variables (private key) to PRs from forks. On 19 Oct 2015 6:33 am, "Peter Lejeck" notifications@github.com wrote:

What about the build? It can't find JJ Abrams

— Reply to this email directly or view it on GitHub https://github.com/hummingbird-me/hummingbird/pull/682#issuecomment-149044803 .

MiLk commented 9 years ago

You mean against the-future, right?

trmcnvn commented 9 years ago

Oops, yeah the-future

NuckChorris commented 9 years ago

Shit can we expose the key anyways? It's just to the one repo and it's not like it's a big security thing. Worst case scenario, somebody sees F6 a few months early

trmcnvn commented 9 years ago

We can set the key to public which will allow PRs to use but it will also log the key in every build log. If we're okay with that :confused: I can make the change.

NuckChorris commented 9 years ago

We can't make it secure-but-present-in-PRs? I guess it is kind of a really niche thing

trmcnvn commented 9 years ago

Nope, doesn't seem possible.

Encrypted environment variables are not available to pull requests from forks due to the security risk of exposing such information to unknown code.

I looked into storing the key in the repo encrypted, but travis stores the encryption keys as secure environment variables so that doesn't work either.

NuckChorris commented 9 years ago

Is the key read-only? If so I'd say make it public. Otherwise we could be 'sploited easy

trmcnvn commented 9 years ago

Yep, it's read-only. and now public.

NuckChorris commented 9 years ago

Well anyways, back on topic: this is a +1 from me, the solution here seems pretty viable. Still seems silly to me that we have to do this whole rigamarole but w/e

NuckChorris commented 9 years ago

Eventually we're gonna wanna split them into separate Dockerfiles, mind you. But this is a start, and we desperately need a simple dev environment like this

MiLk commented 9 years ago

I agree with splitting in multiple dockerfiles, but it would mean a different foreman config or no foreman at all.

NuckChorris commented 9 years ago

We don't necessarily need to use Foreman

NuckChorris commented 9 years ago

Technically speaking I think when you deploy a Procfile-based app on Heroku it splits each into a separate LXC Container

MiLk commented 9 years ago

Updated. Test passed.

NuckChorris commented 9 years ago

Looks good to me

trmcnvn commented 9 years ago

Would be good to get the wiki information updated if needed.

On Tue, Oct 20, 2015 at 3:10 AM, Peter Lejeck notifications@github.com wrote:

Looks good to me

— Reply to this email directly or view it on GitHub https://github.com/hummingbird-me/hummingbird/pull/682#issuecomment-149284231 .

MiLk commented 9 years ago

Will do it when it becomes the main branch. Makes sense?

trmcnvn commented 9 years ago

:+1: I'll get this merged as soon as I can finish up some Ember code needed to support docker. Hopefully tonight.

JoshFabian commented 9 years ago

Is this now the preferred way for a new local machine to be setup? Can we update the readme to reflect this? Lot of new contributors interested in helping that this will be helpful for.

MiLk commented 9 years ago

Hum, which place? The readme is already pointing to the right page of the wiki.