File tree Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -656,6 +656,7 @@ services:
656
656
- CRON_DAILY_DATABASE_CLEANUP
657
657
- CRON_WORKER_RESTART
658
658
- INTERNETNL_INSTALL_BASE
659
+ - COMPOSE_PROJECT='{{index .Container.Labels "com.docker.compose.project"}}'
659
660
restart : unless-stopped
660
661
logging :
661
662
driver : $LOGGING_DRIVER
Original file line number Diff line number Diff line change @@ -6,4 +6,4 @@ if [ ! "$CRON_WORKER_RESTART" = "True" ];then
6
6
fi
7
7
8
8
# find nassl worker and restart the container(s)
9
- docker ps --filter label=com.docker.compose.service=worker-nassl --quiet | xargs -- no-run-if-empty docker restart
9
+ docker ps --filter label=com.docker.compose.service=worker-nassl --filter label=com.docker.compose.project= " $COMPOSE_PROJECT " -- quiet | xargs -n1 -- no-run-if-empty -I% sh -c ' docker restart %; sleep 30 '
Original file line number Diff line number Diff line change @@ -6,4 +6,4 @@ if [ ! "$CRON_WORKER_RESTART" = "True" ];then
6
6
fi
7
7
8
8
# find worker and restart the container(s)
9
- docker ps --filter label=com.docker.compose.service=worker --quiet | xargs -- no-run-if-empty docker restart
9
+ docker ps --filter label=com.docker.compose.service=worker --filter label=com.docker.compose.project= " $COMPOSE_PROJECT " -- quiet | xargs -n1 -- no-run-if-empty -I% sh -c ' docker restart %; sleep 30 '
You can’t perform that action at this time.
0 commit comments