Informatievlaanderen / VSDS-LDESServer4J

Linked Data Event Streams Server for Java
https://informatievlaanderen.github.io/VSDS-LDESServer4J
European Union Public License 1.2
8 stars 8 forks source link

Database migration from mongoDB to postgres #1301

Open xdxxxdx opened 1 month ago

xdxxxdx commented 1 month ago

Configurations:

  1. I have a mongo db storage from previous version of the server.
  2. The docker compose file for the project at follow:

    version: '3.3'
    services:
    
    # LDES Server and Postgres Database
    ldes-server:
        container_name: bear_b_ldes-server
        image: ldes/ldes-server:3.0.0-SNAPSHOT
        environment:
        - SPRING_CONFIG_LOCATION=/config/
        volumes:
        - ./ldes-server.yml:/config/application.yml:ro
        ports:
        - 8080:8080
        networks:
        - ldes
        depends_on:
        - ldes-postgres
    ldes-postgres:
        container_name: ldes-postgres
        image: postgres:14-alpine
        ports:
        - 5432:5432
        environment:
        - POSTGRES_PASSWORD=admin
        - POSTGRES_USER=admin
        - POSTGRES_DB=bearb
        networks:
        - ldes
    ldes-mongodb:
        container_name: bear_b_ldes-mongodb
        image: mongo:latest
        ports:
        - 27017:27017
        networks:
        - ldes
    networks:
    ldes:
        name: benchmark_network

Server configuration is as follow:

mongock:
  migration-scan-package: VSDS
  migrate-mongo: true
springdoc:
  swagger-ui:
    path: /v1/swagger
management:
  tracing:
    enabled: false
ldes-server:
  host-name: "http://ldes-server:8080"
  use-relative-url: true
spring:
  datasource:
    url: jdbc:postgresql://ldes-postgres:5432/bearb
    username: admin
    password: admin
  data:
    uri: mongodb://ldes-mongodb:27017/bearb
  jpa:
    hibernate:
      ddl-auto: update
  batch:
    jdbc:
      initialize-schema: always
server:
  port: 8080

Scenario: docker compose up to start the server

Current result: The data stored at the mongodb DB are not migrated to postgres db. image

And there is no trace indicating what is happening: image