Compose restart policy
A Compose restart policy determines when Docker should automatically restart a container after it exits or the Docker daemon restarts. This course uses unless-stopped so production services can return after failures or machine reboots unless an operator explicitly stopped them.
Minimal example
services:
api:
image: ghcr.io/yashdagar/zomato-api:latest
restart: unless-stopped
worker:
image: ghcr.io/yashdagar/zomato-worker:latest
restart: unless-stoppedLearn this concept
Lesson 7.1 · Multi-stage Dockerfiles for GoUsed in exercises
Exercise 7.2 · Production container stack Exercise 7.7 · Nightly mysqldump and one restore testPrerequisite conceptsDocker Compose