Skip to content
This repository was archived by the owner on Apr 30, 2026. It is now read-only.

Commit 75064a6

Browse files
committed
fix: support ferretdb v2
1 parent 27373d9 commit 75064a6

2 files changed

Lines changed: 13 additions & 31 deletions

File tree

action.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,10 @@ inputs:
2121
required: false
2222
default: "disabled"
2323

24-
use-postgres:
25-
description: 'Configure FerretDB to use PostgreSQL (default "disabled")'
26-
required: false
27-
default: "false"
28-
2924
runs:
3025
using: "docker"
3126
image: "Dockerfile"
3227
args:
3328
- ${{ inputs.ferretdb-version }}
3429
- ${{ inputs.ferretdb-port }}
3530
- ${{ inputs.ferretdb-telemetry }}
36-
- ${{ inputs.use-postgres }}

start-ferretdb.sh

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,19 @@ USE_POSTGRES=$4
77

88
echo "Starting FerretDB version ${FERRETDB_VERSION} on port ${FERRETDB_PORT}"
99

10-
if [ "$USE_POSTGRES" = "true" ]; then
11-
echo "Starting FerretDB with Postgres"
12-
13-
docker network create ferretdb
14-
15-
docker run --network ferretdb --name postgres \
16-
-e POSTGRES_USER=username \
17-
-e POSTGRES_PASSWORD=password \
18-
-e POSTGRES_DB=ferretdb \
19-
-d postgres
20-
21-
docker run --network ferretdb --name ferretdb \
22-
-p $FERRETDB_PORT:27017 \
23-
-e FERRETDB_POSTGRESQL_URL=postgres://username:password@postgres:5432/ferretdb?pool_max_conns=40 \
24-
-e FERRETDB_TELEMETRY=$FERRETDB_TELEMETRY \
25-
-d ghcr.io/ferretdb/ferretdb:$FERRETDB_VERSION
26-
else
27-
echo "Starting FerretDB with sqlite"
28-
29-
docker run --name ferretdb \
30-
-p $FERRETDB_PORT:27017 \
31-
-e FERRETDB_HANDLER=sqlite \
32-
-e FERRETDB_TELEMETRY=$FERRETDB_TELEMETRY \
33-
-d ghcr.io/ferretdb/ferretdb:$FERRETDB_VERSION
34-
fi
10+
docker network create ferretdb
11+
12+
docker run --network ferretdb --name postgres \
13+
-e POSTGRES_USER=username \
14+
-e POSTGRES_PASSWORD=password \
15+
-e POSTGRES_DB=ferretdb \
16+
-d ghcr.io/ferretdb/postgres-documentdb:latest
17+
18+
docker run --network ferretdb --name ferretdb \
19+
-p $FERRETDB_PORT:27017 \
20+
-e FERRETDB_POSTGRESQL_URL=postgres://username:password@postgres:5432/ferretdb?pool_max_conns=40 \
21+
-e FERRETDB_TELEMETRY=$FERRETDB_TELEMETRY \
22+
-d ghcr.io/ferretdb/ferretdb:$FERRETDB_VERSION
3523

3624
if [ $? -ne 0 ]; then
3725
echo "Error starting FerretDB Docker container"

0 commit comments

Comments
 (0)