Skip to content

Commit

Permalink
mongo update 7
Browse files Browse the repository at this point in the history
  • Loading branch information
hexaforce committed Dec 24, 2024
1 parent 769a278 commit 8205359
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/ci_server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,11 @@ jobs:

ci-server-test:
runs-on: ubuntu-latest
services:
mongo:
image: mongo:5-focal
ports:
- 27017:27017
steps:
- name: checkout
uses: actions/checkout@v3
- name: Docker Compose start
run: docker compose -f $GITHUB_WORKSPACE/docker-compose.yml up -d reearth-mongo
- name: set up
uses: actions/setup-go@v4
with:
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ services:
- 27017:27017
volumes:
- ./mongo:/data/db
- ./mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
command: ["mongod", "--replSet", "rs0"]
6 changes: 6 additions & 0 deletions mongo-init.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
rs.initiate({
_id: "rs0",
members: [{ _id: 0, host: "localhost:27017" }],
});

rs.status();

0 comments on commit 8205359

Please sign in to comment.