Useful images to use in workflows.
This should be identical to the image used in AWS lambdas. Run your tests in this image where possible.
We are including the shared lambda layer provided by SYS to match the production environment.
This is the base AWS ruby lambda with tools installed that allow us to install and build gems.
Feel free to add additional tooling to this image as required.
This is the dev CI image tweaked for local development work (with docker-compose).
It will install gems into /bundler
, which should be a volume shared with the app
container, so this image can
install the gems, and the app can use them (see
sinatra-base)
for an example).
This is the postgres CI image tweaked for local development work.
- Add
rerun
to reload the app when code changes are detected. - Set up bundler to use
/bundler
(seeaws-lambda-ruby-builder
above) - Open port 9292 and set the default command to run
rerun
Rerun is installed separately and the gem copied into the local image to avoid 'polluting' the main app image with build tools.
We are still skipping the lambda handler here; we would need to set up a mock Load Balancer to take a request (e.g. http://localhost) and convert it to a lambda event. This could be looked at in the future to really match the production environment, but at the time of writing, there doesn't seem to be an easy way to mock the Load Balancer.