Repository navigation
Documentdb #9
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
Documentdb #9
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
993ab83
add init support for documentdb
mrqwer88 349ee8a
refactor init_storage_default_dirs.sh
mrqwer88 714c33d
move documentdb version to env
mrqwer88 64db9ec
move /var/lib/fastnetmon and /var/cache/fastetmon to volumes
mrqwer88 228c1cf
update default version for documentdb image and add documentdb to README
mrqwer88 b16658b
update matrix, more use of documentdb
mrqwer88 0b8e828
fix for correct exit with --wait
mrqwer88 f4c4869
update README.md
mrqwer88 21dab56
fix to documentdb/custom-entry.sh
mrqwer88 dd37785
fix typo in README
mrqwer88 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,65 @@ | ||
| services: | ||
| documentdb: | ||
| # https://documentdb.io/docs/getting-started/docker/ | ||
| image: ghcr.io/documentdb/documentdb/documentdb-local:${FNM_DOCUMENTDB_VERSION:-pg18-1.0.0} | ||
| networks: | ||
| - fastnetmon-network | ||
| restart: unless-stopped | ||
| volumes: | ||
| - documentdb_data:/data | ||
| - ${FNM_PATH}/services/documentdb/custom-entry.sh:/custom-entry.sh:ro | ||
| secrets: | ||
| - mongo_password | ||
| environment: | ||
| USERNAME: administrator | ||
| PASSWORD_FILE: /run/secrets/mongo_password | ||
| DOCUMENTDB_USAGE_TELEMETRY: false | ||
| TLS_MODE: disabled | ||
| DOCUMENTDB_PORT: 27017 | ||
| entrypoint: [ "/bin/bash", "/custom-entry.sh" ] | ||
| #healthcheck: | ||
| # test: [ "CMD", "mongosh", "--eval", "db.adminCommand('ping')", "--quiet" ] | ||
| # interval: 1m30s | ||
| # timeout: 30s | ||
| # retries: 5 | ||
| # start_period: 40s | ||
|
|
||
|
|
||
| documentdb-configure: | ||
| # need enable collation for LiveView | ||
| image: ghcr.io/documentdb/documentdb/documentdb-local:${FNM_DOCUMENTDB_VERSION:-pg18-1.0.0} | ||
| network_mode: "service:documentdb" | ||
| user: documentdb | ||
| entrypoint: [ "/bin/bash", "-ec" ] | ||
| command: | ||
| - | | ||
| until pg_isready -h 127.0.0.1 -p 9712 -U documentdb; do | ||
| sleep 1 | ||
| done | ||
|
|
||
| psql -X -v ON_ERROR_STOP=1 \ | ||
| -h 127.0.0.1 -p 9712 \ | ||
| -U documentdb -d postgres <<'SQL' | ||
| ALTER SYSTEM SET documentdb_core.enableCollation = 'on'; | ||
| SELECT pg_reload_conf(); | ||
| SQL | ||
|
|
||
| psql -X -h 127.0.0.1 -p 9712 \ | ||
| -U documentdb -d postgres \ | ||
| -c "SELECT current_setting('documentdb_core.enableCollation');" | ||
| depends_on: | ||
| documentdb: | ||
| condition: service_healthy | ||
| restart: "no" | ||
| healthcheck: | ||
| disable: true | ||
|
|
||
| fastnetmon: | ||
| depends_on: | ||
| documentdb: | ||
| condition: service_healthy | ||
| documentdb-configure: | ||
| condition: service_completed_successfully | ||
| environment: | ||
| MONGO_HOST: documentdb | ||
| DOCUMENTDB_ENABLED: true | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| #!/bin/sh | ||
| set -e | ||
|
|
||
| PASSWORD_FILE="${PASSWORD_FILE:-/run/secrets/mongo_password}" | ||
| export PASSWORD="$(cat $PASSWORD_FILE)" | ||
|
|
||
| exec /home/documentdb/gateway/scripts/emulator_entrypoint.sh "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.