Added depends_on
This commit is contained in:
@@ -2,6 +2,8 @@ version: '2'
|
|||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: invoiceninja/invoiceninja
|
image: invoiceninja/invoiceninja
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
labels:
|
labels:
|
||||||
io.rancher.scheduler.affinity:host_label: ${HOST_LABEL_KEY}=${HOST_LABEL_VALUE}
|
io.rancher.scheduler.affinity:host_label: ${HOST_LABEL_KEY}=${HOST_LABEL_VALUE}
|
||||||
io.rancher.sidekicks: cron, db, web
|
io.rancher.sidekicks: cron, db, web
|
||||||
@@ -23,17 +25,25 @@ services:
|
|||||||
sleep 1h
|
sleep 1h
|
||||||
done
|
done
|
||||||
EOF'
|
EOF'
|
||||||
|
labels:
|
||||||
|
io.rancher.scheduler.affinity:host_label: ${HOST_LABEL_KEY}=${HOST_LABEL_VALUE}
|
||||||
networks:
|
networks:
|
||||||
- ninja-net
|
- ninja-net
|
||||||
volumes_from:
|
volumes_from:
|
||||||
- app
|
- app
|
||||||
db:
|
db:
|
||||||
image: mysql
|
image: mysql
|
||||||
|
labels:
|
||||||
|
io.rancher.scheduler.affinity:host_label: ${HOST_LABEL_KEY}=${HOST_LABEL_VALUE}
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- ${VOLUME_DATA}:/var/lib/mysql:nocopy
|
- ${VOLUME_DATA}:/var/lib/mysql:nocopy
|
||||||
web:
|
web:
|
||||||
image: nginx
|
image: nginx
|
||||||
|
depends_on:
|
||||||
|
- app
|
||||||
|
labels:
|
||||||
|
io.rancher.scheduler.affinity:host_label: ${HOST_LABEL_KEY}=${HOST_LABEL_VALUE}
|
||||||
networks:
|
networks:
|
||||||
- ninja-net
|
- ninja-net
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
Reference in New Issue
Block a user