tenzil

tenzil

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

Showing Posts 1 to 9

tenzil

tenzil OP

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.

tenzil

tenzil OP

thanks @elcritch, i appreciate it. i do knew little bit about releases, when i read about heroku/gigalixir deployment docs and i went with distillery.

Googling few blogs for aws deployemnt, found out this one,

please do post, blogs on phoenix deployment to AWS.

gcauchon

gcauchon

This got me curious! What aspect of your design discard Docker from the equation?

I’ve deployed many Elixir web applications to cloud providers with (then) Distillery and (now) mix release and it is, imho so much simpler for 95% of the use cases…

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.

tenzil

tenzil OP

Hi folks, sorry for the late update. I went with releases. I haven’t spent much time exploring docker, well its in the pipeline, and next stop would be deploying with docker.
thank you folks

onkara

onkara

@kreiling.io are you injecting secrets? are you generating prod.env on the fly in your CI/CD (or any release method) is there a different process responsibly for copying the prod.env ?

onkara

onkara

@tenzil since you are deploying to AWS EC2 would you mind sharing the OS image being used?

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.

— All posts loaded —

Where Next? Top

Trending in Questions Top

RSP87
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
RemyXRenard
I’m seeing that a list inside a Kino.DataTable will be interpreted as a charlist, even if the Kino.configure() is set to charlists: :as_l...
New
velrest
So my question is quite simple and i have found no conclusive answer on forum, google or AI. Should we use :erlang.float for Integer to ...
New
nseaSeb
Hello, I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
samoloth
Hi, I’ve just set up an application with ash_authentication. There is only magic link strategy for now, so there is no confirmation add o...
New
FlyingNoodle
If a change or preparation module uses Ash.Changeset.get_argument/2 or Ash.Query.get_argument/2 (or any of the other get_argument functio...
New
ryanwinchester
apply_graft/2 doesn’t rewrite an add_many sub-workflow’s deps on an add step. Grafted jobs cancel with “upstream job was deleted” Version...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews