Skip to content

Commit

Permalink
Fix mongo health at startup due to failed key
Browse files Browse the repository at this point in the history
  • Loading branch information
galeaspablo committed Nov 13, 2024
1 parent c7ed5f9 commit e36782f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion local-development/dev_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e

docker compose down
docker compose up -d --build --force-recreate || docker logs mongo-projection
docker compose up -d --build --force-recreate

echo "The application is up!"
echo "You can navigate to localhost:8080 to view your application."
Expand Down
6 changes: 3 additions & 3 deletions local-development/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,15 @@ services:
- "sh"
- "-c"
- "[ ! -f /data/db/entrypoint-finished ] && (
timeout 35s /usr/local/bin/docker-entrypoint.sh mongod
timeout 40s /usr/local/bin/docker-entrypoint.sh mongod
|| (
touch /data/db/entrypoint-finished &&
cp /keyfile/mongo.key /data/configdb/mongo.key &&
cp /keyfile/mongo.key /data/configdb/mongo.key && chmod 600 /data/configdb/mongo.key &&
mongod --replSet rs0 --bind_ip 172.30.0.108 --keyFile /data/configdb/mongo.key --auth
)
)
|| (
cp /keyfile/mongo.key /data/configdb/mongo.key &&
cp /keyfile/mongo.key /data/configdb/mongo.key && chmod 600 /data/configdb/mongo.key &&
mongod --replSet rs0 --bind_ip 172.30.0.108 --keyFile /data/configdb/mongo.key --auth
)"
volumes:
Expand Down

0 comments on commit e36782f

Please sign in to comment.