Skip to Main Content
Mastering Elixir
book

Mastering Elixir

by André Albuquerque, Daniel Caixinha
July 2018
Intermediate to advanced content levelIntermediate to advanced
574 pages
14h 7m
English
Packt Publishing
Content preview from Mastering Elixir

Composing the deployment containers

Our goal here is to have an automated way to run the project test suite, and if everything goes well, to build a new image that only contains the release and push it to the production environment.

For this, we'll use a specific compose file, docker-compose.test.yml, which performs two steps: first, it spins up the release service that builds the release, runs the tests, and tags the image as release_prepared:latest. Then, it spins up the app service that creates the final image by copying the release from the previous image:

$ cat umbrella/docker-compose.test.ymlversion: '2.3'services:  app:    # ...  release:    image: release_prepared:latest    build:      context: .      dockerfile: Dockerfile    env_file: - ./env/test.env ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Testing Elixir

Testing Elixir

Andrea Leopardi, Jeffrey Matthias

Publisher Resources

ISBN: 9781788472678Supplemental Content