imcvampire

imcvampire

Mix release doesn't work even with server: true

I have added server: true to my code but my Mix release still doesn’t work. Did I miss anything?

My code is live on https://gitlab.com/imcvampire/tools

Marked As Solved

derek-zhou

derek-zhou

I think the issue is this: Your application is called :tools which is already taken by a standard erlang application:

So the release process got confused and release that application instead. Therefore, there is nothing of your own code in the release.

Also Liked

derek-zhou

derek-zhou

“It doesn’t work” has no meaning to anyone other than yourself. Please explain:

  • What was your intention?
  • What did you do?
  • What did you expect?
  • what did you get instead?
imcvampire

imcvampire

Really sorry guys!

Well I’m trying to build a Mix release and try to run it. My expectation is it should work like mix phx:server.

Here is the reproducible steps:

  • Run ./build.sh to create a mix release
  • Run PORT=4000 MIX_ENV=prod _build/prod/rel/tools/bin/tools start to start the server
  • Access localhost:4000 via both browsers and curl. Both throw errors and the problem is there is no Phoenix server bind to any port.

My expectation is the server should start and bind itself to port 4000.

derek-zhou

derek-zhou

There are only two hard things in Computer Science: cache invalidation and naming things.
– Phil Karlton

That’s the moral of this struggle. OTP applicaions have a flat name space, and one have to dodge the following:

Maybe the mix phx.new can be enhanced to check for potential name collisions.

Last Post!

imcvampire

imcvampire

Wow, nice catch! Thank you.

Let me try with another name.

Where Next?

Popular in Questions Top

vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
hariharasudhan94
Lets say I have map like this fetching from my database %{"_id" => #BSON.ObjectId<58eb1a7a9ad169198c3dXXXX>, "email" => ...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? Ecto.Repo — Ecto v3.14.0 has exampl...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New

Other popular topics Top

vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
axelson
This post is a wiki (feel free to hit the edit button near the bottom right of this post to add your own changes!) This post collects co...
239 49266 226
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New

We're in Beta

About us Mission Statement