flyway / flyway-docker

Official Flyway Docker images
Apache License 2.0
215 stars 82 forks source link

custom DatabaseType in flyway docker #159

Open KirillKurdyukov opened 1 month ago

KirillKurdyukov commented 1 month ago

Hello,

I am currently facing issues while attempting to integrate a custom dialect for YDB into Flyway Docker. Detailed information about this effort can be found in my pull request.

Below is the Docker Compose configuration I used:

version: '3'
services:
  ydb-migrate-local:
    image: flyway/flyway
    command: -X -url=jdbc:ydb:grpc://localhost:2136/local -locations=/migration/migration migrate
    volumes:
      - ./migration:/flyway/migration
      - ./drivers:/flyway/libexec/drivers
      - ./lib:/flyway/libexec/lib
    depends_on:
      - ydb-local

  ydb-local:
    image: cr.yandex/yc/yandex-docker-local-ydb:latest
    environment:
      GRPC_TLS_PORT: 2135
      GRPC_PORT: 2136
      MON_PORT: 8765
      YDB_DEFAULT_LOG_LEVEL: NOTICE
      YDB_USE_IN_MEMORY_PDISKS: true
    hostname: localhost
    ports:
      - "2135:2135"
      - "2136:2136"
      - "8765:8765"

Upon attempting to run the migration, I encountered the following error:

ydb-migrate-local-1  | ERROR: Unexpected error
ydb-migrate-local-1  | org.flywaydb.core.api.FlywayException: No database found to handle jdbc:ydb:grpc://localhost:2136/local

I have made the following observations that might require further investigation:

  1. The flyway/libexec/lib directory does not seem to be present in the image, which could be affecting the loading of custom drivers.
  2. I'm concerned that the image has a limited list of supported databases, which doesn't include custom dialects.

Could you please help me resolve these issues? Any guidance or suggestions for further debugging steps would be greatly appreciated.

Thank you for your assistance.