9mm
I’m looking to deploy a Phoenix API to AWS. I don’t need any fancy features, I just need to be able to select a specific node type (high compute), and ideally it could be easy to deploy nodes.
There are thousands of guides I’m finding, and the 3 i’ve tried were all broken.
Is there a really good guide (in terms of security, scalability, configuration, etc), which I can just fully commit to going through?
Trending in Questions
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
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
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
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
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
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
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
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
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
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
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
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
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
gavsim
Have you considered nanobox.io? I know they support deploying to AWS and have Elixir / Phoenix as a supported platform: https://guides.nanobox.io/elixir/phoenix/
idi527
Maybe GitHub - bitwalker/distillery-aws-example: An example application to go with the AWS guide in the Distillery documentation · GitHub for Deploying To AWS - Distillery Documentation
9mm
That guide is so broken that I just stopped following it.
This is the one I’m doing now:
https://cloud.google.com/community/tutorials/elixir-phoenix-on-kubernetes-google-container-engine
It works great so far, the only part I’m confused on is where I define my environment variables so that REPLACE_OS_VARS from distillery can replace them. I’m assuming its not when i package the release, but after.
idi527
You can set
REPLACE_OS_VARSin a pre configure hook.As for the distillery guide, it wasn’t broken at all when I followed it a few months ago.
9mm
Hmm weird. I encountered like 3 or 4 places that I fixed easily enough but it didn’t give me confidence in the guide. ultimately I stopped though because I didnt want to depend on amazon blackbox services which Ive had experience with before. Granted, my current method deals with Google blackbox services but I trust those more for some reason.
If you look at that link you will see
REPLACE_OS_VARSin the docker image, so I basically do this (all the environment variables at this point look like"${THIS_FORMAT}":At this point I can do:
and it works…
Then
I can see in their docker image they have
REPLACE_OS_VARSI’m just wondering where they fit in AFTER release but before docker build? Can you explain what you mean by pre-configure hook?Also as a side question. One thing I found really strange was that I could
mix releasewith your standard"${VAR_HERE}".. and then when i would RUN the release withREPLACE_OS_VARS=true ... foregroundit would work! This part I dont understand, how does the app know AT RUN TIME to replace the variables? Is that some code distilierry injects into my app to make it know to do that at run time rather than at compile time?9mm
Oh I see, its in the deploy scripts in
_build/prod/rel/app/lib/clever
idi527
You can set
REPLACE_OS_VARSjust before running the app. It’s being deprecated in favor of config providers, though.See Runtime Configuration - Distillery Documentation for more.
9mm
Damn well this looks super confusing. I’ll have to get docker running start to finish first then ill figure out how to do that.
How might I do that with this current strategy I’m doing, can you give me an examle of a single variable and where I put it so I don’t have to read all that (for now)
idi527
Let’s say you have something like
in your
config.exssomewhere.To make it replaceable at runtime, you’d need to set
REPLACE_OS_VARSbefore starting the release. One way to do it is in a pre configure hook.9mm
Oh I’m talking about doing away with this method “${DB_PATH}” and REPLACE_OS_VARS and just doing it the proper way with config providers
im actually just reading now to see how to do it