8000 Add RESTART_WITH_BUILD option by sksat · Pull Request #105 · sksat/compose-cd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add RESTART_WITH_BUILD option #105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 31, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion compose-cd
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ function load_config() {

if [ -z ${REPO_GIT_REMOTE+x} ]; then REPO_GIT_REMOTE="origin"; fi

if [ -z ${RESTART_WITH_BUILD+x} ]; then RESTART_WITH_BUILD=false; fi

if "$UPDATE_REPO_ONLY" && "$UPDATE_IMAGE_ONLY"; then
compose_log echo "UPDATE_REPO_ONLY and UPDATE_IMAGE_ONLY are true. This is something wrong."
exit 1
Expand All @@ -138,7 +140,13 @@ function load_config() {

function service_up() {
compose_log notify "starting service..."
docker-compose up -d 2>/dev/null
if ! "$RESTART_WITH_BUILD"; then
docker-compose up -d 2>/dev/null
else
compose_log notify "start build..."
docker-compose up -d --build 2>/dev/null
compose_log notify "finish build"
fi
compose_log notify "service is up!"
}

Expand Down
0