Skip to content

Commit 1c4315f

Browse files
committed
fix: use bitnami/mongodb image for replica set support
Use the well-maintained bitnami/mongodb image which supports single-node replica set initialization via environment variables, instead of a custom image that needs to be published to ghcr.io.
1 parent 36ec5e3 commit 1c4315f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,14 @@ jobs:
196196
services:
197197
# Main MongoDB with replica set (required for transactions)
198198
mongo-replica:
199-
image: ghcr.io/deepkit/mongo-replica:${{ matrix.mongo-version }}
199+
image: bitnami/mongodb:${{ matrix.mongo-version }}
200200
ports:
201201
- 27017:27017
202+
env:
203+
MONGODB_REPLICA_SET_MODE: primary
204+
MONGODB_REPLICA_SET_NAME: rs0
205+
MONGODB_ADVERTISED_HOSTNAME: localhost
206+
ALLOW_EMPTY_PASSWORD: 'yes'
202207
# MongoDB with auth for simple-auth tests
203208
mongo-auth:
204209
image: mongo:5.0.10

0 commit comments

Comments
 (0)