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
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
rsyncit 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
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
Found edeliver, reading Deploying Elixir applications with Edeliver « Plataformatec Blog
will update soon how it goes. please do post your suggestions
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.
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








