Hi, I’m probably missing something very simple but I can’t for the life of me get a simple Phoenix app deployed; either directly on my OS X dev machine or with docker.
Here’s what I did:
Created a very simple Phoenix app from scratch, Ph 1.5.6; elixir 1.11.1, OTP 23.
the app works in dev perfectly with ‘mix phx.server’
I’ve created a docker file, exactly as shown here: https://hexdocs.pm/phoenix/releases.html#containers
Only change replaced ‘my_app’ with my app name. Image builds successfully.
When I build image with docker (either locally or on Google Cloud build) and deploy it to either local docker or on a Ubuntu 18.04 server I get literally nothing: the log file is completely blank.
Browser pointed to port 4000 (Chrome) reports empty response. Nothing (absolutely nothing) in the logfile (not even “listening on port 4000 etc.)”
I’ve tried running in prod locally, by following the commands in the Dockerfile and executing same commands locally; everything completes fine.
then when I run:
SECRET_KEY_BASE=“xxx…” DATABASE_URL=“postgresql://postgres:pw@[IPofPostgres]:5432/testdeploy_prod” _build/prod/rel/testdeploy/bin/testdeploy start
I get the same: absolutely nothing on the terminal (it just hangs) and empty response on port 4000. I can see a beam process was started on the machine.
When I CTRL-C I get:
BREAK: (a)bort (A)bort with dump ©ontinue §roc info (i)nfo
(l)oaded (v)ersion (k)ill (D)b-tables (d)istribution
so looks like it was in the beam, but somewhere it is getting stuck.
it does work with “mix phx.server” instead of “start” but that won’t work in the Docker image.
I have no idea what else to try; I’ve been struggling for a week now and is holding up release.
I tried all the above again with a clean install (absolutely no changes made) and the same!!! (going nuts)
Am I missing something really obvious??
Thanks for any pointers.