Improve Server CE dev environment (#13820)

* Avoid stray backslash in ggrep pattern
* Add new services to README
* Avoid building in bin/up
* Add init script
* Update README.md
* Use cURL to wait for MongoDB
* Add a note about COMPOSE_PARALLEL_LIMIT
* Use the new callout syntax

GitOrigin-RevId: 9aaec37e893a2da807fed2dc4b00fa52a433c390
This commit is contained in:
Alf Eaton
2023-08-04 08:34:19 +01:00
committed by Copybot
parent d0822a03f0
commit b30cfde1f8
8 changed files with 44 additions and 22 deletions

3
develop/bin/build Executable file
View File

@@ -0,0 +1,3 @@
#!/usr/bin/env bash
docker-compose build --pull "$@"

View File

@@ -1,3 +1,3 @@
#!/usr/bin/env bash
docker-compose down
docker-compose down "$@"

6
develop/bin/init Executable file
View File

@@ -0,0 +1,6 @@
#!/usr/bin/env bash
docker-compose up --detach mongo
curl --max-time 10 --retry 5 --retry-delay 5 --retry-all-errors --silent --output /dev/null localhost:27017
docker-compose exec mongo mongosh --eval "rs.initiate({ _id: 'overleaf', members: [{ _id: 0, host: 'mongo:27017' }] })"
docker-compose down mongo

View File

@@ -5,5 +5,5 @@ docker-compose logs --follow --tail 10 --no-color "$@" \
| ggrep --line-buffered --invert-match "health.check" \
| ggrep --line-buffered --invert-match "slow event loop" \
| ggrep --line-buffered --invert-match "process.memoryUsage" \
| ggrep --line-buffered --only-matching "\{.*" \
| ggrep --line-buffered --only-matching "[{].*" \
| bunyan --output short

View File

@@ -1,3 +1,3 @@
#!/usr/bin/env bash
docker-compose up --build --detach "$@"
docker-compose up --detach "$@"