Skip to content
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

Statically compiling postgrest #365

Closed
ruslantalpa opened this issue Nov 15, 2015 · 7 comments
Closed

Statically compiling postgrest #365

ruslantalpa opened this issue Nov 15, 2015 · 7 comments

Comments

@ruslantalpa
Copy link
Contributor

I think we should try and compile v3 like described here
http://begriffs.com/posts/2015-08-11-dev-deploy-haskell-docker.html
https://github.com/nilcons/ghc-musl

@PierreR
Copy link
Contributor

PierreR commented Nov 15, 2015

Thanks for the pointers. I haven't watched the video yet but wouldn't be much better to have this issue fixed: http://bugs.alpinelinux.org/issues/4257

There is a risk here to get a complicated docker build process which might stop being maintained in the future. To me a much more ideal situation would be to have native alpine ghc and stack packages. Then you have the leverage to build a nice small docker image.

@PierreR
Copy link
Contributor

PierreR commented Nov 15, 2015

I am also waiting for stack to offer the possibility to build inside custom small docker image automatically. Right now, only Ubuntu precise is supported (which is not an option for a small image). This is a known issue and I read somewhere that it might be fixed in a couple of weeks/months.

@PierreR
Copy link
Contributor

PierreR commented Nov 15, 2015

Another alternative that does not require docker is described here:
https://ro-che.info/articles/2015-10-26-static-linking-ghc

@ruslantalpa
Copy link
Contributor Author

The idea is not the docker thing (that is just the build env)
I was sugesting building the binary so that it does not have dependencies and its compiled with ghc that itself was built against musl so that the resulting bin is as small as posible, i doubt we depend much on things from glibc

On 15 Nov 2015, at 13:45, Pi3r notifications@github.com wrote:

Another alternative that does not require docker is described here:
https://getpocket.com/a/read/1084317437


Reply to this email directly or view it on GitHub.

@begriffs
Copy link
Member

begriffs commented Dec 8, 2015

I'm OK with building binaries for several platforms at each release. If you figure out how to make a portable statically linked binary then we can distribute that instead, but things are OK for now.

@steve-chavez
Copy link
Member

This would be specially useful on Windows, users keep reporting problems there.

Currently we require a full PostgreSQL installation in Windows to use pgrst and when the db is in another server that dependency seems too big. I don't know a way of getting just libpq on Windows(haven't tried msys2).

@steve-chavez
Copy link
Member

Closing in favor of #1295.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants