Merge pull request #1247 from thakkaryash94/patch-4

Added named volume in docker-compose.md
This commit is contained in:
Rico Sta. Cruz 2020-01-01 10:03:05 +11:00 committed by GitHub
commit 7a8e661857
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 0 deletions

View File

@ -216,3 +216,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:
```