Restart with Docker compose file

Hi All,

I have written a docker-compose file (below) and want to restart the container whenever It stop. File run successfully and both container starts but when I stop one container (Drupal) then it won’t start automatically, Could you please help me out to find what I am doing wrong.

version: ‘3’

services:
drupal:
image: drupal
ports:
- “8080:80”
restart: always
postgres:
image: postgres
environment:
- POSTGRES_PASSWORD=mypassword

Thanks
Gaurav

Read this