-
Notifications
You must be signed in to change notification settings - Fork 8
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
dockerized version #6
Comments
I've been meaning to write some documentation for setting it up locally... a docker container would be a great idea. I'll see what I can do in the next few days. |
Here is a quick example for a multi-stage docker file based on alpine and gopherjs/vecty, if it can help yout to save some precious time ^^. https://github.com/nobonobo/vecty-chatapp/blob/master/Dockerfile |
I made some instructions on how to get it running locally - can you run through them and see if there's any problems? |
p.s. Setting this up as a docker container won't be trivial for two reasons:
|
Thanks I will try it tonight :-), will keep you update Many thanks ^^ |
Later today I will try with that too, https://github.com/kassisol/docker-volume-git |
Hi Dave, Hope you are all well ! Many thanks for the local version, it makes my life so easier for testing some new golang packages. Your work is just amazing as it fits in many of my side projects on golang ast and package embedding. I have a couple more questions, and one that probably I should I have posted in forky or golib, but I can re-publish them later if you do not mind. Questions:Fetch remote git repos in local modeActually, it seems that go packages have to be already installed in my GOPATH. And, by exploring the code, I saw that you use the the context struct from go/build, so I was wondering how complicated it would be to have jsgo with a custom GOPATH to fetch/load remote/local packages (without GCSE client) SuggestionParse go test files*
Nb. Would be awesome to have a gitter chat for quick questions or suggestions (more convenient than slack for me) Last word, you have made an amazing work dude ! How many brains do you have :-) ?! Cheers, |
Hey Rosco, to get it to fetch git repos in local mode should be very simple... Take a look at: https://github.com/dave/jsgo/blob/master/server/server.go ... we just need to change where it injects the fetcher (the bit that gets git repos) and the resolver (the bit that resolves go paths into git repos) into the server in local mode... I never extracted the "live" version of the resolver to an external service, so to use the live resolver, you just set it to nil. So... Change this: if config.LOCAL {
fileserver = localfileserver.New(config.LocalFileserverTempDir, config.Static, config.Host, config.Bucket)
database = localdatabase.New(config.LocalFileserverTempDir)
fetcherResolver := localfetcher.New()
c = cache.New(
database,
fetcherResolver,
fetcherResolver,
config.HintsKind,
)
} else { to this: if config.LOCAL {
fileserver = localfileserver.New(config.LocalFileserverTempDir, config.Static, config.Host, config.Bucket)
database = localdatabase.New(config.LocalFileserverTempDir)
c = cache.New(
database,
gitfetcher.New(
cachefileserver.New(1024*1024*1042, 100*1024*1024),
fileserver,
config.GitFetcherConfig,
),
nil,
config.HintsKind,
)
} else { ... and it should work? (I didn't test this) |
Parsing go test files shouldn't be too difficult to add, but I never implemented it for the jsgo ecosystem because it's not really needed. |
Cool, I will test it now and post feedback later. |
Is there any roadmap or deck describing jsgo's ecosystem and goals ? I would be more than pleased to understand the origins/problems to solve that triggered this interesting project |
No, there's no more documentation above what's in the readme. |
Hi, Hope you are all well ! Sorry for the delay, but I am playing with jsgo quite a lot, and it is really awesome. I managed to make it work locally but I add to install some dependencies not mentioned in the doc. Also, for the docker container, I spent 2 days with an alpine based image but I had lots of tweaks to do in order to make it work (wasted lot of time that before finding that gopherjs check strictly the go version as I had v1.11.1 and not gov1.11). So, I need more time to get some packed properly on my side. But, for now, I have some annoying errors that maybe you can help to sort out. https://play.jsgo.io/github.com/shurcooL/gtdo gopath/src/github.com/shurcooL/gtdo/doc_handler.go:203:31: New not declared by package select_menu And, if you a the "dev" build tag, you get: {"Time":"2018-10-16T16:20:52.712398+02:00","Error":"gopath/src/golang.org/x/sys/unix/timestruct.go:13:24: undeclared name: Timespec","Ip":""} Saved playground link: Is there a way to pass build tags as query parameter with values, maybe comma separated, in the url ? Thanks in advance Cheers, |
Not sure why that's happening... But if that |
But wait This is the GopherJS package: https://play.jsgo.io/github.com/shurcooL/gtdo/frontend/ ... which runs, but doesn't work well probably because it's looking for static assets. |
Here's it deployed: https://jsgo.io/shurcooL/gtdo/frontend It's panicing here: https://github.com/shurcooL/gtdo/blob/22ff496d3dddd4f4b66788de296a336952d9fe70/frontend/frontend.go#L69 ... because this isn't in the index page HTML: https://github.com/shurcooL/gtdo/blob/22ff496d3dddd4f4b66788de296a336952d9fe70/_data/head.html.tmpl#L10 |
Thanks for explanations above, I will continue to read gopherjs/vecty and jsgo codebases. One thing, can you confirm that latest src-d update, 4 days ago, on `gopkg.in/src-d/go-git.v4/...", is generating the same error as above, on your side ? have (sivafs.SivaFS)
want (billy.Filesystem, cache.Object)" Last question, from your perspective, what are the benefits of gopherjs on the long run ? Is it "a nice to have" project for Google ? Some contacts argued that they could not find any serious boilerplate/demo for a real-world use case, so not suitable for agency/production purposes. What made you write jsgo project ? Gopherjs projects found: |
I refreshed all my dependencies including I love Go but I also love the front-end web. Running Go on the front-end is something I've always wanted to do.
Absolutely right. It's definitely not mature enough for "agency" purposes. Whether it's ready for production depends on the context. I'm running it in production with play.jsgo.io, and it works great. The jsgo system is something I've always wanted to create, since first playing with GopherJS - the package splitting and caching specifically. Check out the little intro on https://github.com/dave/jsgo |
Hmm yes you're right... I'll take a closer look... |
Aaah I had a branch checked out in my go-git directory, so it wasn't pulling the latest master. I've fixed the bug... give it a try now. |
Hi,
Hope you are all well !
I was trying play online for a couple of advanced tests (package analysis, ast/import, flogo plugins, ...) and they failed because of write permissions. So I tried to build "play" or "jsgo" locally but it since it can not find the "message" package...
Is there a dockerize version (alpine based) for play and jsgo ?
It would so convenient for users or devs :-)
Thanks for all this cool project !
Cheers,
Rosco
The text was updated successfully, but these errors were encountered: