1
votes

I've developed an app on Windows machine and I need to deploy it to Ubuntu 18.04 server. The tools I'd like to use are distillery and edeliver.

So can I just build the release with distillery on my Windows machine or should I build it on the machine with the same CPU architecture and Ubuntu 18.04 as the future production machine will be, for example create Virtualbox Ubuntu guest machine, share my app's project folder between Windows host machine and guest machine and build release on Ubuntu guest machine?

If someone develop elixir apps on Windows can you share steps of your deployment procedure?

3

3 Answers

0
votes

Normally distillery packs everything you need to run your app and it's platform dependent. We do our builds in docker with image that matches production server architecture precisely, but it's also possible to use some dedicated build server.

However, if your app doesn't use any odd libraries that depend on binaries, I think (but I'm not sure) you might get away with just setting up runtime on server as you wish and just moving erlang bytecode compiled on Windows. But why would you want to do that?

0
votes

I have attempted to help @PaulSchoenfelder with deploying Elixir apps built on Windows in the past. I don't believe I'm talking out of school to say we never had roaring success with this. We could get it to work but it always had some rough edges. Hence my answer to you would be build it (and run Distillery against it) on your Ubuntu target.


EDIT: I had forgotten that if you're on Windows 10 then WSL may be an option for you as well.

0
votes

In general, the best way to deploy Erlang or Elixir is to use a release. A release will include the Erlang Runtime as well as all your config, beam files etc.

In theory, you can cross-compile a release but it is probably more trouble than it is worth. I generally just use a Virtual Machine via Vagrant

I have an email course about it here https://elixirtraining.us7.list-manage.com/subscribe?u=150de5dbc56d446a48f7fc3fd&id=03791ac7a9