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
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
“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
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.shto create a mix release - Run
PORT=4000 MIX_ENV=prod _build/prod/rel/tools/bin/tools startto start the server - Access
localhost:4000via both browsers andcurl. 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
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:
- Built-in Erlang OTP applications
- Bulit-in Elixir applications
- Whatever HEX packages that you may need to use in the future
Maybe the mix phx.new can be enhanced to check for potential name collisions.
Last Post!
imcvampire
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #elixirconf-us
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex









