Skip to content

Commit

Permalink
fix a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
b1ron committed Nov 3, 2023
1 parent 35524af commit 97f3b6a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ tasks:
- >
docker compose up --always-recreate-deps --force-recreate --remove-orphans --renew-anon-volumes -t 0 --detach
--build {{.DB}}
- task: init
- task: init-repl
preconditions:
- sh: "test {{.DB}}"
msg: "Please set DB variable to one of `postgresql`, `sqlite`, or `mongodb`"
Expand Down Expand Up @@ -106,13 +106,13 @@ tasks:
docker compose run --rm mongosh mongosh mongodb://host.docker.internal:27017/
--verbose --eval 'disableTelemetry()' --shell
init:
init-repl:
desc: "Initializes a new replica set"
cmds:
- >
docker compose run --rm mongosh mongosh
'mongodb://host.docker.internal:27017/'
--eval 'let config = {_id: "mongodb-rs", members: [{_id: 0, host: "localhost"}]}; try { db.getSiblingDB("admin").runCommand({replSetGetStatus: 1}); } catch (e) { if (e !== null) { db.getSiblingDB("admin").runCommand({replSetInitiate: config}); } }'
'mongodb://host.docker.internal:27017/'
--eval 'config={_id:"mongodb-rs",members:[{_id:0,host:"localhost"}]};try{db.getSiblingDB("admin").runCommand({replSetGetStatus:1});}catch(e){if(e!==null){db.getSiblingDB("admin").runCommand({replSetInitiate:config});}}'
# see https://github.com/DavidAnson/markdownlint-cli2#command-line for the reason we use double-quotes
docs-fmt:
Expand Down

0 comments on commit 97f3b6a

Please sign in to comment.