Skip to content

Instantly share code, notes, and snippets.

@okram999
Last active January 23, 2019 15:30
Show Gist options
  • Save okram999/66c92c9eecedd8a50e932f5927176563 to your computer and use it in GitHub Desktop.
Save okram999/66c92c9eecedd8a50e932f5927176563 to your computer and use it in GitHub Desktop.
docker-compose notes
depends_on :
- db # This makes the service to restart on the service that its depending on restarts. But not vice-versa
restart: always # This tells the service to restart when a fault occurs
## some commands
$ docker network ls
$ docker network inspect <network_name>
$ docker-compose exec <service_name> sh
$ docker-compose scale <service_name>=3 # here 3 is the desired count
# docker-compose up lifecycle
build & pull
Create
start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment