I have a docker-compose.yml file that contains 4 containers: redis, postgres, api, worker
During the development of worker, I often need to restart it i
docker-compose -f [COMPOSE_FILE_NAME].yml restart [SERVICE_NAME]
Use Case #1: If the COMPOSE_FILE_NAME is docker-compose.yml and service is worker
docker-compose restart worker
Use Case #2: If the file name is sample.yml and service is worker
docker-compose -f sample.yml restart worker
By default docker-compose looks for the docker-compose.yml if we run the docker-compose command, else we have flag to give specific file name with -f [FILE_NAME].yml