Fix and comment empty-dirs + volume-from
This commit is contained in:
@@ -99,10 +99,10 @@ services:
|
|||||||
webapp:
|
webapp:
|
||||||
image: nginx
|
image: nginx
|
||||||
volumes:
|
volumes:
|
||||||
- sources:/var/www/html
|
- websource:/var/www/html
|
||||||
labels:
|
labels:
|
||||||
# sources is actually an empty directory on the node
|
# sources is actually an empty directory on the node
|
||||||
katenary.io/empty-dirs: sources
|
katenary.io/empty-dirs: websource
|
||||||
|
|
||||||
php:
|
php:
|
||||||
image: php:7-fpm
|
image: php:7-fpm
|
||||||
@@ -113,8 +113,9 @@ services:
|
|||||||
katenary.io/same-pod: webapp
|
katenary.io/same-pod: webapp
|
||||||
# see the corresponding section, get the volume
|
# see the corresponding section, get the volume
|
||||||
# fro webapp
|
# fro webapp
|
||||||
katenary.io/volume-from:
|
katenary.io/volume-from: |
|
||||||
sources: webapp
|
sources:
|
||||||
|
webapp: websource
|
||||||
```
|
```
|
||||||
|
|
||||||
## volume-from
|
## volume-from
|
||||||
@@ -126,7 +127,7 @@ services:
|
|||||||
webapp:
|
webapp:
|
||||||
image: nginx
|
image: nginx
|
||||||
volumes:
|
volumes:
|
||||||
- data:/var/www/html
|
- datasource:/var/www/html
|
||||||
|
|
||||||
app:
|
app:
|
||||||
image: php
|
image: php
|
||||||
@@ -134,7 +135,10 @@ services:
|
|||||||
- data:/opt/data
|
- data:/opt/data
|
||||||
labels:
|
labels:
|
||||||
katenary.io/volume-from: |
|
katenary.io/volume-from: |
|
||||||
data: webapp
|
# data in this container...
|
||||||
|
data:
|
||||||
|
# ... correspond to "datasource" in "webapp" container
|
||||||
|
webapp: datasource
|
||||||
```
|
```
|
||||||
|
|
||||||
This implies that the declared volume in "webapp" will be mounted to "app" pods.
|
This implies that the declared volume in "webapp" will be mounted to "app" pods.
|
||||||
|
Reference in New Issue
Block a user