-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Try building with Docker #32
Conversation
Cool. I don't know much about docker at all, but I'd have no objections to I'll also try running that on my machine.
|
Yes, I've tried to more or less replicate the Vagrant setup. Is it normal that there are so many things that need to be compiled? Are those packages not provided in the extra-binary-caches? |
Compilation takes 10-15 minutes I think the first time, but it's a one time I'm sure it is possible to build a nix cache that has everything we need,
|
commercialhaskell/stack#337 Those describe some work getting GHCJS buildable with stack. Hopefully this means we could use a more standard set of packages than we do now, and thereby get by with the official cache. |
@nightscape if you are still interested, you could take another look at this now that the build has been converted over to Stack (see #34) and does not use Nix anymore. It might be that this is now a lot simpler. This page in the Stack guide might be useful, not sure. |
I'm still interested, although maybe not the best person to do it due to lack of any Cabal/Stack knowledge. I've asked in the repo of the official Haskell Docker image if they can provide an example on how to best build Stack based projects. If they comment on that I'll try and apply it to Unison. |
Cool. On Sat, Jan 30, 2016 at 3:40 PM Martin Mauch notifications@github.com
|
@pchiusano Do you happen to know if one can tell stack to just download and compile the dependencies, not the code itself? |
Try On Tue, Feb 2, 2016 at 7:59 PM Martin Mauch notifications@github.com
|
Ok, I've got everything built inside Docker. It takes ages the first time, but it should be quite fast after that until you need to touch the Unfortunately, the generated editor.html assumes that one can access the compiled |
Forgot to mention: The editor.html file itself also needs to be served by Scotty (or some other way via TCP port). |
Ok, almost got it :D |
And here we go! I'm just uploading my locally built image to docker hub, once the upload is finished (it's a hefty 5.6 GB) you can try it using the following command
and then browsing to http://localhost:8080/. Once this PR is merged you (or I) could create an automated build on Docker Hub so that people can always get the latest version (you can also select to build only dedicated branches). I just hope that the automated build is not detected as DoS and killed 😁 These are the limits to the automated build:
|
Hey, let's just get rid of the |
using wai-middleware-static
Also remove obsolete make-editor-html part of build instructions
Ok, got rid of the |
I would just call it 'unison' if that is available, otherwise 'unisonweb'. The 'platform' is not necessary. The GitHub org uses that just to distinguish from the unisonweb.org site, which is also under the unisonweb GitHub org. |
You have to give it a |
And I'm not a 100% sure if the name of an automated build can deviate from the Github repo name, checking that now... |
Hi Paul,
I'm trying to get Unison to run in Docker which would make it super-easy for people to try it out by just doing a
Unfortunately I'm completely new to nix and cabal and compilation fails with changing reasons, the last one being
Could you maybe try if a
in this branch works on your machine?
Best
Martin
BTW: I hope it's OK that I already created a PR with this although it's not yet running correctly. I find PRs very useful for tracking code and comments in the same place.