I'm attempting to build and deploy a Phoenix (Elixir) application using Docker. I would like to produce a container or set of container, that I can simply push to my server and run using docker-compose
Includes IOJS NPM Copy package json, then NPM install
Inside the FE container, run webpack for production Assets output is ~/tmp/app/bundles in host machine
Install Phoenix and Elixir stuff Copy App Install App dependencies (like gems in Rails) Compile elixir dependencies (This is a required step in elixir)
This needs to happen in Phoenix container Fingerprints and gzips assets To do this I mount ~/tmp/app/bundles Digested assets go to ~/tmp/app/static in host
This happens in Phoenix container Mount diggested assets Release is copied to ~/tmp/app/rel in host Then release is copied to ./release in project (so the next step has access to it)
This is the container that will be deployed Copy the release folder generated above to the container
-
Release produces a binary, when I shell into the app container and run the binary manually it runs. But when trying to use docker compose to run this binary, it fails with permission denied, clues?
-
Where would nginx fit into this? Another container with just nginx that pipes to the app container?