File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed
Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -14,10 +14,12 @@ Commands:
1414 up [service...] Start the full stack or specific services
1515 down [options...] Stop and remove containers (passes extra flags to compose)
1616 restart [service...] Recreate the full stack or specific services
17+ update|upgrade <service> Pull the latest image(s) for the given service(s) then restart
1718 ps Show container status
1819 logs <service> Follow logs for a service
1920 pull [service...] Pull images for all or specific services
2021 exec <service> <cmd> Run a command inside a service container
22+ version Show version (prints the contents of the file 'version' with a trailing newline)
2123 help Show this help message
2224
2325Examples:
@@ -45,6 +47,16 @@ case "$cmd" in
4547 restart)
4648 compose up -d --force-recreate " $@ "
4749 ;;
50+ update|upgrade)
51+ if [[ $# -lt 1 ]]; then
52+ echo " update requires at least one service name" >&2
53+ exit 1
54+ fi
55+ # Pull latest image(s) for the specified service(s)
56+ compose pull " $@ "
57+ # Restart the service(s) with force recreate
58+ compose up -d --force-recreate " $@ "
59+ ;;
4860 ps|status)
4961 compose ps " $@ "
5062 ;;
@@ -67,6 +79,15 @@ case "$cmd" in
6779 shift
6880 compose exec " $service " " $@ "
6981 ;;
82+ version)
83+ if [[ -f version ]]; then
84+ cat version
85+ echo
86+ else
87+ echo " version file not found" >&2
88+ exit 1
89+ fi
90+ ;;
7091 help|-h|--help)
7192 usage
7293 ;;
Original file line number Diff line number Diff line change 1- 1.4.1
1+ 1.5.0
You can’t perform that action at this time.
0 commit comments