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

Add healthcheck #1684

Merged
merged 1 commit into from
Apr 14, 2022
Merged

Conversation

TheLastProject
Copy link
Contributor

This communicates to the built-in serverinfo system to see if the Nextcloud instance is healthy.

I have marked this as WIP because this won't work under php-fpm and I'm not sure how to deal with that. If nextcloud/serverinfo#190 gets implemented this could be made to work in both regular and php-fpm version.

This could also be implemented without jq by using sed as follows ( | sed -n 's;<status>\(.*\)</status>;\1;p')) but this is definitely less clean and may cause unexpected issues if there is ever another "status" field added so I wouldn't recommend that.

@TheLastProject TheLastProject force-pushed the feature/healthcheck branch 2 times, most recently from 013e0d9 to 477632a Compare January 29, 2022 14:54
@TheLastProject TheLastProject force-pushed the feature/healthcheck branch 4 times, most recently from c627bfe to 7c89c0e Compare April 13, 2022 16:52
@TheLastProject TheLastProject marked this pull request as ready for review April 13, 2022 16:53
This checks if status.php returns succesfully to determine if the
Nextcloud instance is health.

Signed-off-by: Sylvia van Os <[email protected]>
@skjnldsv skjnldsv requested review from J0WI and pbek April 14, 2022 06:56
@skjnldsv skjnldsv merged commit f9d8052 into nextcloud:master Apr 14, 2022
@TheLastProject TheLastProject deleted the feature/healthcheck branch April 14, 2022 07:41
@J0WI
Copy link
Contributor

J0WI commented Apr 14, 2022

@skjnldsv https://github.com/docker-library/faq#healthcheck=

This also breaks on all FPM variants.

@skjnldsv
Copy link
Member

@J0WI wanna revert?

docker-library-bot added a commit to docker-library-bot/official-images that referenced this pull request Apr 26, 2022
Changes:

- https///github.com/nextcloud/docker/commit/00c5180: Merge pull request https///github.com/nextcloud/docker/pull/1737 from J0WI/readme-typos
- https///github.com/nextcloud/docker/commit/a497f03: Runs update.sh
- https///github.com/nextcloud/docker/commit/f511ef2: Minor typos
- https///github.com/nextcloud/docker/commit/b842cb3: Merge pull request https///github.com/nextcloud/docker/pull/1728 from nextcloud/feat/simultaneaous-html-init
- https///github.com/nextcloud/docker/commit/35b8ebf: Allow simultaneous initialization of common html volume
- https///github.com/nextcloud/docker/commit/e76b7ca: Merge pull request https///github.com/nextcloud/docker/pull/1732 from nextcloud/revert-1684-feature/healthcheck
- https///github.com/nextcloud/docker/commit/ca1e773: Revert "Add healthcheck"
- https///github.com/nextcloud/docker/commit/f9d8052: Merge pull request https///github.com/nextcloud/docker/pull/1684 from TheLastProject/feature/healthcheck
- https///github.com/nextcloud/docker/commit/4bb8d00: Create command-rebase.yml
- https///github.com/nextcloud/docker/commit/1bd3a50: Merge pull request https///github.com/nextcloud/docker/pull/1730 from nextcloud/add/summary-mandatory-step
- https///github.com/nextcloud/docker/commit/8355426: Add healthcheck
- https///github.com/nextcloud/docker/commit/58273cd: Merge pull request https///github.com/nextcloud/docker/pull/1698 from t3easy/hide-nginx-infos
- https///github.com/nextcloud/docker/commit/2753dad: Add mandatory summary step for branches protection
- https///github.com/nextcloud/docker/commit/da935d2: Runs update.sh
- https///github.com/nextcloud/docker/commit/e36ca5f: Fix regex for pecl prereleases (https///github.com/nextcloud/docker/pull/1725)
- https///github.com/nextcloud/docker/commit/71f4a94: update.sh: Remove unused paths (https///github.com/nextcloud/docker/pull/1723)
docker-library-bot added a commit to docker-library-bot/official-images that referenced this pull request Apr 26, 2022
Changes:

- https///github.com/nextcloud/docker/commit/3f42156: 23.0.4 stable (https///github.com/nextcloud/docker/pull/1738)
- https///github.com/nextcloud/docker/commit/00c5180: Merge pull request https///github.com/nextcloud/docker/pull/1737 from J0WI/readme-typos
- https///github.com/nextcloud/docker/commit/a497f03: Runs update.sh
- https///github.com/nextcloud/docker/commit/f511ef2: Minor typos
- https///github.com/nextcloud/docker/commit/b842cb3: Merge pull request https///github.com/nextcloud/docker/pull/1728 from nextcloud/feat/simultaneaous-html-init
- https///github.com/nextcloud/docker/commit/35b8ebf: Allow simultaneous initialization of common html volume
- https///github.com/nextcloud/docker/commit/e76b7ca: Merge pull request https///github.com/nextcloud/docker/pull/1732 from nextcloud/revert-1684-feature/healthcheck
- https///github.com/nextcloud/docker/commit/ca1e773: Revert "Add healthcheck"
- https///github.com/nextcloud/docker/commit/f9d8052: Merge pull request https///github.com/nextcloud/docker/pull/1684 from TheLastProject/feature/healthcheck
- https///github.com/nextcloud/docker/commit/4bb8d00: Create command-rebase.yml
- https///github.com/nextcloud/docker/commit/1bd3a50: Merge pull request https///github.com/nextcloud/docker/pull/1730 from nextcloud/add/summary-mandatory-step
- https///github.com/nextcloud/docker/commit/8355426: Add healthcheck
- https///github.com/nextcloud/docker/commit/58273cd: Merge pull request https///github.com/nextcloud/docker/pull/1698 from t3easy/hide-nginx-infos
- https///github.com/nextcloud/docker/commit/2753dad: Add mandatory summary step for branches protection
- https///github.com/nextcloud/docker/commit/da935d2: Runs update.sh
- https///github.com/nextcloud/docker/commit/e36ca5f: Fix regex for pecl prereleases (https///github.com/nextcloud/docker/pull/1725)
- https///github.com/nextcloud/docker/commit/71f4a94: update.sh: Remove unused paths (https///github.com/nextcloud/docker/pull/1723)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants