diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3aea7ff..9f42c77 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -42,24 +42,3 @@ jobs: - run: npm install - run: PORT=12345 npm test - - postgres-enabled: - name: Start FerretDB with Postgres - - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Start FerretDB - uses: ./ - with: - use-postgres: "true" - - - name: Use Node.js - uses: actions/setup-node@v3 - with: - node-version: 18 - - - run: npm install - - run: npm test diff --git a/action.yml b/action.yml index defd570..1a2925c 100644 --- a/action.yml +++ b/action.yml @@ -21,11 +21,6 @@ inputs: required: false default: "disabled" - use-postgres: - description: 'Configure FerretDB to use PostgreSQL (default "disabled")' - required: false - default: "false" - runs: using: "docker" image: "Dockerfile" @@ -33,4 +28,3 @@ runs: - ${{ inputs.ferretdb-version }} - ${{ inputs.ferretdb-port }} - ${{ inputs.ferretdb-telemetry }} - - ${{ inputs.use-postgres }} diff --git a/start-ferretdb.sh b/start-ferretdb.sh index 3a94ebb..05c8fbc 100644 --- a/start-ferretdb.sh +++ b/start-ferretdb.sh @@ -7,31 +7,19 @@ USE_POSTGRES=$4 echo "Starting FerretDB version ${FERRETDB_VERSION} on port ${FERRETDB_PORT}" -if [ "$USE_POSTGRES" = "true" ]; then - echo "Starting FerretDB with Postgres" - - docker network create ferretdb - - docker run --network ferretdb --name postgres \ - -e POSTGRES_USER=username \ - -e POSTGRES_PASSWORD=password \ - -e POSTGRES_DB=ferretdb \ - -d postgres - - docker run --network ferretdb --name ferretdb \ - -p $FERRETDB_PORT:27017 \ - -e FERRETDB_POSTGRESQL_URL=postgres://username:password@postgres:5432/ferretdb?pool_max_conns=40 \ - -e FERRETDB_TELEMETRY=$FERRETDB_TELEMETRY \ - -d ghcr.io/ferretdb/ferretdb:$FERRETDB_VERSION -else - echo "Starting FerretDB with sqlite" - - docker run --name ferretdb \ - -p $FERRETDB_PORT:27017 \ - -e FERRETDB_HANDLER=sqlite \ - -e FERRETDB_TELEMETRY=$FERRETDB_TELEMETRY \ - -d ghcr.io/ferretdb/ferretdb:$FERRETDB_VERSION -fi +docker network create ferretdb + +docker run --network ferretdb --name postgres \ + -e POSTGRES_USER=username \ + -e POSTGRES_PASSWORD=password \ + -e POSTGRES_DB=ferretdb \ + -d ghcr.io/ferretdb/postgres-documentdb:latest + +docker run --network ferretdb --name ferretdb \ + -p $FERRETDB_PORT:27017 \ + -e FERRETDB_POSTGRESQL_URL=postgres://username:password@postgres:5432/ferretdb?pool_max_conns=40 \ + -e FERRETDB_TELEMETRY=$FERRETDB_TELEMETRY \ + -d ghcr.io/ferretdb/ferretdb:$FERRETDB_VERSION if [ $? -ne 0 ]; then echo "Error starting FerretDB Docker container"