[Haskell-beginners] Deploying a haskell application (not a webapp)

Christopher Reichert creichert07 at gmail.com
Sat Dec 13 14:51:41 UTC 2014



On Sat, Dec 13 2014, "Alan Buxton" <alanbuxton at gmail.com> wrote:
> Hi
>
>  
>
> I have created an application using cabal that now installs fine and runs
> fine on my dev machine.
>
>  
>
> I now want to deploy this application onto a separate server. This is not a
> webapp.
>


So, what kind of application is it? What are your requirements? It would
certainly help to know a bit more about what you are trying to do.


>
> Try as I might, Google will not point me in the direction of how to do this,
> apart from loads of links to Keter which is not what I want (there is no
> nginx or any other web server involved).
>

What have you tried searching for?

>  
>
> Any advice on the neatest way to do this?
>

It all depends. Do you want to share your app with others? Are you
researching how you might deploy a Haskell app to some production
scenario?


GHC compiled binaries statically link haskell libraries and link against
some dynamic libraries (primarily C libs).  The binary can be copied
between machines of the same architecture (assuming dynamically linked
libraries are satisfied on the target machine).


You can see runtime dependencies of your app:

    $ ghc --make ./Main.hs
	not a dynamic executable
    $ ldd ./Main
	linux-vdso.so.1 (0x00007fff201fc000)
	libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007fcc42fe6000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fcc42ce5000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007fcc42adc000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fcc428d8000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fcc426c2000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fcc42318000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fcc420fb000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fcc43296000)

For the most simple case you can just copy your app to a target machine:

    $ scp ./app me at host:




Regards,

-- 
Christopher Reichert
irc: creichert
gpg: C81D 18C8 862A 3618 1376  FFA5 6BFC A992 9955 929B
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/beginners/attachments/20141213/4f91bbcc/attachment.sig>


More information about the Beginners mailing list