-
Notifications
You must be signed in to change notification settings - Fork 100
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 healthchecks to docker-compose.yml #36
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,13 @@ services: | |
- "SMARTHOST_ALIASES=${SMARTHOST_ALIASES}" | ||
|
||
redis: | ||
image: redis:7.2 | ||
image: eqalpha/keydb:x86_64_v6.3.4 | ||
healthcheck: | ||
test: keydb-cli ping || exit 1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is the alternative command if were to use Redis here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. redis-cli ping |
||
interval: 2s | ||
timeout: 1s | ||
retries: 3 | ||
start_period: 30s | ||
|
||
db: | ||
# We use MariaDB because it supports ARM and has the expected collations | ||
|
@@ -27,6 +33,12 @@ services: | |
- mysql_data:/var/lib/mysql | ||
cap_add: | ||
- SYS_NICE # CAP_SYS_NICE Prevent runaway mysql log | ||
healthcheck: | ||
test: mysqladmin --user=$$MYSQL_USER --password=$$MYSQL_PASSWORD status | ||
interval: 2s | ||
timeout: 1s | ||
retries: 3 | ||
start_period: 30s | ||
|
||
misp-core: | ||
image: ghcr.io/misp/misp-docker/misp-core:latest | ||
|
@@ -46,8 +58,16 @@ services: | |
- PYPI_CYBOX_VERSION=${PYPI_CYBOX_VERSION} | ||
- PYPI_PYMISP_VERSION=${PYPI_PYMISP_VERSION} | ||
depends_on: | ||
- redis | ||
- db | ||
redis: | ||
condition: service_healthy | ||
db: | ||
condition: service_healthy | ||
healthcheck: | ||
test: curl -ks https://localhost/users/login > /dev/null || exit 1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this check run inside the container? In other words, Is There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it's run inside the container.
|
||
interval: 2s | ||
timeout: 1s | ||
retries: 3 | ||
start_period: 30s | ||
ports: | ||
- "80:80" | ||
- "443:443" | ||
|
@@ -126,7 +146,8 @@ services: | |
environment: | ||
- "REDIS_BACKEND=redis" | ||
depends_on: | ||
- redis | ||
redis: | ||
condition: service_healthy | ||
|
||
volumes: | ||
mysql_data: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This image is x64 only while the Redis image is ARM as well. Would it be possible to remove the arch modifier here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that unless MISP changes the default key-value storage, we should only document this alternative in the README.md rather than modify the
docker-compose.yml
fileThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine by me. All their images are arch-specific except
eqalpha/keydb:latest
which is both for arm64 and x86_64.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should also reference https://github.com/valkey-io/valkey if a docker image is available.