Skip to content
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

Take some actions to avoid unhealthy containers #1241

Merged
merged 3 commits into from
Jan 7, 2022
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ x-healthcheck-defaults: &healthcheck_defaults
# https://github.com/moby/moby/issues/39388
# https://github.com/getsentry/self-hosted/issues/1000
interval: 30s
timeout: 5s
timeout: 60s
retries: 5
start_period: 10s
x-sentry-defaults: &sentry_defaults
Expand Down
13 changes: 8 additions & 5 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
#!/usr/bin/env bash
set -e

# Pre-pre-flight? 🤷
if [[ -n "$MSYSTEM" ]]; then
echo "Seems like you are using an MSYS2-based system (such as Git Bash) which is not supported. Please use WSL instead.";
exit 1
fi

umask 002

source "$(dirname $0)/install/_lib.sh" # does a `cd .../install/`, among other things

source dc-detect-version.sh
# Pre-flight. No impact yet.
source parse-cli.sh
source check-latest-commit.sh
source dc-detect-version.sh
source error-handling.sh
source check-latest-commit.sh
source check-minimum-requirements.sh

# Let's go! Start impacting things.
source turn-things-off.sh
source create-docker-volumes.sh
source ensure-files-from-examples.sh
source generate-secret-key.sh
source replace-tsdb.sh
source update-docker-images.sh
source build-docker-images.sh
source turn-things-off.sh
source set-up-zookeeper.sh
source install-wal2json.sh
source bootstrap-snuba.sh
Expand Down
3 changes: 3 additions & 0 deletions install/_lib.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
set -euo pipefail
test "${DEBUG:-}" && set -x

# Override any user-supplied umask that could cause problems, see #1222
umask 002

# Thanks to https://unix.stackexchange.com/a/145654/108960
log_file="sentry_install_log-`date +'%Y-%m-%d_%H-%M-%S'`.txt"
exec &> >(tee -a "$log_file")
Expand Down
4 changes: 4 additions & 0 deletions install/dc-detect-version.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
echo "${_group}Initializing Docker Compose ..."

# Some environments still use `docker-compose` even for Docker Compose v2.
dc_base="$(docker compose version &> /dev/null && echo 'docker compose' || echo 'docker-compose')"
if [[ "$(basename $0)" = "install.sh" ]]; then
Expand All @@ -6,3 +8,5 @@ else
dc="$dc_base --ansi never"
fi
dcr="$dc run --rm"

echo "${_endgroup}"