Containers: Docker, Compose and Swarm

Advanced

Bad Gateway after every release

The team ships the API several times a day with docker compose up -d --build. After every release the shop answers 502 Bad Gateway, until someone restarts the nginx container by hand. The API itself is fine: curl from inside the network works. Make releases stop breaking the shop.

nginx serves the site and forwards /api/ to the API. The test runs docker compose up -d --build, opens http://<server>/api/products every minute for twelve hours, and ships a new version of the API every two hours, starting at 1:15.

What your server must hold

  • Availability ≥ 99 %

What you will master