Merge pull request #1247 from thakkaryash94/patch-4
Added named volume in docker-compose.md
This commit is contained in:
commit
7a8e661857
|
@ -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:
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue