pecampelo

pecampelo

Trying to facilitate more prominent and faster usage of Docker

Both in a professional level, with enterprise production apps, and personal projects with others, some people I know have a hard time configuring an elixir application from scratch, specifically inside a Docker container (with or without the usage of docker compose). I gotta say, I honestly totally avoid installing any language whatsoever, and working outside of Docker, getting used to working with others all the time, and deploying to custom k8s cluster.

From where I stand, people getting into the language have a really hard time setting up all the environment variables, dev or test environments locally for a ready up CI/CD, and understanding how to make a proper release within a container.

I would first like to understand whether this is a sentiment for any other folks in the community, or maybe there is something missing from my common understanding, and also from folks around me who work with Elixir in a day-to-day basis. I myself, to be honest, don’t have much of a hard time since I was the one who configured most docker images based on the Elixir docker hub images, as well as some other config, but when most devs hit the barriers of

  • `rebar`
  • the `/rel` folder
  • setting up `ENCRYPTION_SALT` and `LIVE_VIEW_SALT`
  • setting up a project to run a `phx.server` vs. generating a `hex` dependency…
  • setting up an Application depending on the use of the deps involved (PubSub or not with Redis adapter, how should one setup locally?)

Obviously, this is empirical knowledge of sorts. I state that even senior devs right beside me often resort to copying an existing project, instead of doing the setup from scratch, customizing to their needs, and leaving stuff inside the project that they didn’t need in the first place. I don’t know how clear I made myself to be, let me know if more examples could illustrate my point or I made my point across.

My idea, therefore, in order to facilitate adoption of Elixir, is to extend Phoenix, or maybe its generators, to provide early adopters or even a CLI that generates a project fully set up with the latest dockerhub image, separating images for development/test and production, with a `docker-compose.yml` setup, so a faster creation of projects is possible. Again, I am looking for validation of this idea, so maybe I am utmost wrong and this is a minor sector of the community that I am looking at. Of course, everyone here who builds macros and works with metaprogramming already will know it by heart, but I am focused on the entry-levels and mid-levels mostly.

If the idea is considered adequate and valid for the Phoenix core team, I am open to develop it myself from scratch, and open to suggestions on how to do so. I already have some idea of it ready, but I am just looking to fish right now.

Most Liked

rhcarvalho

rhcarvalho

There’s already mix phx.gen.release --docker for the deployment situation, and it serves as a starting point, not trying to serve everyone out of the box, because there are multiple ways to go about deployment (many documented in HexDocs).

For development, the general stance of the Phoenix team has been encouraging developing outside of Phoenix, for example by creating an Igniter installer to do what you’re proposing. If it turns out a major success within the community it can be added later to Phoenix if necessary. Removing parts, on the other hand, is much harder.

Where Next?

Popular in Proposals: Ideas Top

Gladear
Hello everyone! tldr; I propose to add a way for VerifiedRoutes to know if they’re used for get, post, etc to make them even more robust...
New
moacirbishopcamata
Good morning to the Elixir team. Please excuse me if I’m commenting in the wrong place; please indicate where I should discuss this. I ...
New
andypearson
Hey all, I have been working on some performance improvements for the Phoenix application I work on. As part of this, through trial and...
New
hst337
Elixir compiler and language specification Purpose of the proposal Elixir language is in mature state and no breaking or heavy changes ar...
New
dorgan
Currently the Phoenix.LiveView.JS struct is defined as an @opaque type, meaning it’s fields are internal api not to be relied upon. I ha...
New
pelopo
Hi, Oficial docs got this wonderful feature to download the ePub version that we can chuck to our kindles and read it. Now we are in the...
New
AHBruns
So, LiveView 0.20 brought an async processing API which is a thin wrapper around tasks. It’s a very nice convenience, but the main thing ...
New
Matsa59
Lets start by a story, I work with a team on a pretty big CMS with lots of modules. We split the cms using umbrella apps. So we have comp...
New
lemaster
Currently we have stream_insert and stream that can either add new items to a stream or update existing items if they are already present...
New
dibok
Hi, I’m trying to use phoenix.js in my Qt QML project which has it’s own buildin JavaScript engine. Problem is that (what I googled so f...
New

Other popular topics Top

aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 43487 311
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
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
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
jaysoifer
Is there a way to rollback a specific migration and only that one (“skipping” all the other ones)? Would mix ecto.rollback -v 200809061...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New

Latest on Elixir Forum

Elixir Forum

We're in Beta

About us Mission Statement