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

GregPhx
Greetings Everyone!!! A little bit of my background so it could be easier to understand where my comments are coming from, and to take t...
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
tubedude
Hey, Earlier i posted a question, but after some research I think a proposal is due. Working on a Phoenix Live View app, I needed clien...
New
mikesax
On a Rails/Turbo site, the first page is typically loaded using http GET and then sockets are used navigate and replace HTML content for ...
New
Jskalc
Hi everyone! Recently I was thinking a lot about the way HEEX renders lists. People are generally surprised about huge payloads being sen...
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
pejrich
I propose adding compact_map/2 to the Enum module. What is it? Sometimes you want to map over a collection, but sometimes you want to ma...
New
calebjosue
I am reading (Once more) the Phoenix web framework documentation, in the From endpoint to views section contained in the Request life-cyc...
New
caslu
Recently (last week) this PR was merged in Ruby on Rails repository and i thought it could be nice to have in phoenix, basically what it ...
New
knoebber
I started a new phoenix project with --no-tailwind and found friction: delete tailwind classes from core components delete tailwind cla...
New

Other popular topics Top

hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
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
TunkShif
This post is an instruction guide to help you setup your Neovim for Elixir development from scratch. It includes general information on h...
274 41989 114
New
Nvim
Anybody knows a comprehensive comparison of Django and Phoenix, thanks for the help. Where are they similar? Where do they differ the m...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
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
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
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
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New

We're in Beta

About us Mission Statement