Skip to content

Commit

Permalink
Infra - small fix to mongo exec
Browse files Browse the repository at this point in the history
  • Loading branch information
GregJohnStewart committed Mar 14, 2023
1 parent c925b2f commit ca4ed7e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
15 changes: 11 additions & 4 deletions software/Infrastructure/.idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ExecStartPre=/bin/bash -c "/usr/bin/docker rm oqm_mongo || echo 'Could not remov

ExecStart=/bin/bash -c "/usr/bin/docker run --name oqm_mongo -p=27017:27017 -v /data/oqm/db/mongo/:/data/db mongo:4 mongod --replSet rs0"
ExecStartPost=/bin/bash -c "sleep 3s"
ExecStartPost=/bin/bash -c "/usr/bin/docker exec oqm_mongo --eval \"rs.initiate({'_id':'rs0', 'members':[{'_id':0,'host':'localhost:27017'}]})\" || echo 'Probably already initialized.'"
ExecStartPost=/bin/bash -c "/usr/bin/docker exec oqm_mongo mongo --eval \"rs.initiate({'_id':'rs0', 'members':[{'_id':0,'host':'localhost:27017'}]})\" || echo 'Probably already initialized.'"

ExecStop=/bin/bash -c "/usr/bin/docker stop -t 10 oqm_mongo || echo 'Could not stop mongo container'"
ExecStopPost=/bin/bash -c "/usr/bin/docker rm oqm_mongo || echo 'Could not remove mongo container'"
Expand Down

0 comments on commit ca4ed7e

Please sign in to comment.