Added named volume in docker-compose.md

More info. https://docs.docker.com/compose/compose-file/#volumes
This commit is contained in:
Yash Thakkar 2019-10-21 22:59:47 +05:30 committed by GitHub
parent 4da6b9adbe
commit 70f39563b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 0 deletions

View File

@ -214,3 +214,17 @@ networks:
external:
name: frontend
```
### Volume
```yaml
# Mount host paths or named volumes, specified as sub-options to a service
db:
image: postgres:latest
volumes:
- "/var/run/postgres/postgres.sock:/var/run/postgres/postgres.sock"
- "dbdata:/var/lib/postgresql/data"
volumes:
dbdata:
```