Deploying an Amber site seems like it might be really straightforward because it comes with a Dockerfile right out of the generator, but that Dockerfile is designed for use as a development environment.
In order to speed up deployments and reuse code across deployments, I built an Amber image which has the amber binary already built, and nodejs pre-installed. It’s available on Docker Hub.
Importantly, this links amber into the path for use with migrations and other tasks.
Then, a Dockerfile for releasing any given Amber site is fairly straightforward:
This Dockerfile is organized specifically with npm install at the top to make it unlikely it’ll ever need to be run.
DATABASE_URL and REDIS_URL are both pre-set for use with docker for mac, assuming that the databases are hosted on the mac and not some other docker container. These should be over-ridden at deployment.