How to use one Docker-compose command?
Closed this issue · 1 comments
ZedZipDev commented
I read an instruction here
https://github.com/dahlsailrunner/northwind-core-api
and exec 2 commands every time as it is written:
docker volume create --name northwind-pg-data -d local
docker-compose -f .\docker-compose-windows.yml up
But is it possible to add the 1st command to the docker-compose-windows.yml file and perform one command only?
dahlsailrunner commented
Good question! based on what I saw here: https://docs.docker.com/storage/volumes/#use-a-volume-with-docker-compose,
I found that the volume is automatically created if one doesn't already exist. I've updated the readme's in both this repo and the northwind_psql repo to reflect the simpler approach.
In short, just remove the docker volume create
line from the above. :) Should still work fine (which I've confirmed).