mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
b41678d57a
# Conflicts: # .github/workflows/tests.yml # Dockerfile # app/views/install/compose.phtml # composer.lock # mongo-entrypoint.sh # src/Appwrite/Platform/Tasks/Install.php # src/Appwrite/Platform/Tasks/Upgrade.php # tests/e2e/Client.php # tests/e2e/Services/Databases/DatabasesBase.php # tests/e2e/Services/Databases/Legacy/DatabasesCustomClientTest.php # tests/e2e/Services/Databases/Legacy/DatabasesCustomServerTest.php # tests/e2e/Services/Databases/TablesDB/DatabasesBase.php # tests/e2e/Services/Databases/TablesDB/DatabasesCustomClientTest.php # tests/e2e/Services/Databases/TablesDB/DatabasesCustomServerTest.php # tests/e2e/Services/Databases/Transactions/TransactionsBase.php # tests/e2e/Services/GraphQL/Legacy/DatabaseServerTest.php # tests/e2e/Services/GraphQL/TablesDB/DatabaseServerTest.php # tests/e2e/Services/Projects/ProjectsConsoleClientTest.php # tests/e2e/Services/Teams/TeamsCustomClientTest.php
18 lines
524 B
Bash
18 lines
524 B
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
# Fix keyfile permissions if mounted from volume
|
|
KEYFILE_PATH="/data/keyfile/mongo-keyfile"
|
|
|
|
if [ ! -f "$KEYFILE_PATH" ]; then
|
|
echo "Generating random MongoDB keyfile..."
|
|
mkdir -p /data/keyfile
|
|
openssl rand -base64 756 > "$KEYFILE_PATH"
|
|
fi
|
|
|
|
chmod 400 "$KEYFILE_PATH"
|
|
chown mongodb:mongodb "$KEYFILE_PATH" 2>/dev/null || chown 999:999 "$KEYFILE_PATH"
|
|
|
|
# Use MongoDB's standard entrypoint with our command
|
|
exec docker-entrypoint.sh mongod --replSet rs0 --bind_ip_all --auth --keyFile "$KEYFILE_PATH"
|