Last active
January 23, 2019 15:30
-
-
Save okram999/66c92c9eecedd8a50e932f5927176563 to your computer and use it in GitHub Desktop.
docker-compose notes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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