tenzil

tenzil

Suggestions for Phoenix deployment in AWS

Hi folks, i am planning on deploying my app in aws. I have deployed Rails app in EC2. But its my first time for elixir, phoenix. So please guide me here, without docker.
App is a simple, now. it may grow bigger after a month or 2. and there will be a chat functionality (one to one). I have already deployed my app in heroku and gigalixir using distillery. wanted to do the same in aws
Please guide me here

Marked As Solved

kreiling.io

kreiling.io

I only deploy with Elixir releases nowadays. I have to say you shouldn’t shy away from Docker, necessarily!

If you’re trying to deploy to a VPS (such as EC2), I actually do the following:

  • Setup infrastructure such as databases and Nginx on the host
  • Write a script for building the release in a Docker image with the same OS as the host you’re deploying to. The release can produce a tarball, which you copy out of the Docker image and rsync it to the server.
  • The rest is easy - untar it on the server, stop the old application, and fire up the new release!

For secrets, I have a prod.env file on the host that is loaded using bash’s source command, and those env vars are loaded by rel/releases.exs on-boot.

Also Liked

kreiling.io

kreiling.io

I keep a folder full of secret files on my dev laptop synchronized with all of my hosts through rsync, and that is how I distribute secrets to my hosts. This way I can share common secrets across my hosts in the same file(s)

However I’d be wary of doing this in the event that you need to collaborate and synchronize secrets across more than 5-10 developers - then you might want to look into something remote & secure, such as AWS Secrets Manager or AWS Parameter Store.

tenzil

tenzil

Found edeliver, reading Deploying Elixir applications with Edeliver « Plataformatec Blog
will update soon how it goes. please do post your suggestions

elcritch

elcritch

That article is pretty out of date at this point. Elixir 1.9+ has releases built into mix. There’s other threads here on the topic, but you could start with the Phoenix docs on releases at Deploying with Releases — Phoenix v1.8.8 as a good reference point.

And welcome to Phoenix! It’s a fun framework.

Where Next?

Popular in Questions Top

Tee
can someone please explain to me how Enum.reduce works with maps
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod – where is this set? Thanks.
New
ycv005
I have followed this StackOverflow post to install the specific version of Erlang. And When I am running mix ecto.setup then getting fol...
New
vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
New
beno
I will often find my self writing things similar to: case some_value do nil -> something() "" -> something() _ -> somethi...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
itssasanka
Hi all, Trying to get some more clarity over utc_datetime and naive_datetime for Ecto: The documentation above suggests that while ...
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
sergio_101
I am VERY much an elixir newbie. I have taken one elixir course and one phoenix course on Udemy. During that course, I saw the instructor...
New

Other popular topics Top

danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 29377 241
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
JeremM34
Hello, how can I check the Phoenix version ? Thanks !
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New
AstonJ
We’ve put together this wiki for Phoenix LiveView - please feel free to add any info you feel is worth including. What is Phoenix LiveV...
New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New

We're in Beta

About us Mission Statement