diff --git a/botalka/src/main/kotlin/ru/vityaman/lms/botalka/storage/migration/LiquibaseMigration.kt b/botalka/src/main/kotlin/ru/vityaman/lms/botalka/storage/migration/LiquibaseMigration.kt index 3437074..e652f07 100644 --- a/botalka/src/main/kotlin/ru/vityaman/lms/botalka/storage/migration/LiquibaseMigration.kt +++ b/botalka/src/main/kotlin/ru/vityaman/lms/botalka/storage/migration/LiquibaseMigration.kt @@ -15,7 +15,6 @@ class LiquibaseMigration( @Suppress("Deprecation") fun start() { val resources = ClassLoaderResourceAccessor(javaClass.classLoader) - println("Migration::start") source.connection.use { connection -> val database = DatabaseFactory.getInstance() .findCorrectDatabaseImplementation(JdbcConnection(connection)) @@ -23,6 +22,5 @@ class LiquibaseMigration( it.update("development") } } - println("Migration::end") } } diff --git a/docker-compose.yml b/docker-compose.yml index 6ab100d..b88e9c4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,20 +10,26 @@ services: - "8080:8080" networks: - lms-network + depends_on: + database: + condition: service_healthy database: container_name: lms-database image: postgres restart: always ports: - "5432:5432" - volumes: - - ./botalka/src/main/resources/database:/docker-entrypoint-initdb.d environment: POSTGRES_DB: postgres POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres networks: - lms-network + healthcheck: + test: [ "CMD-SHELL", "pg_isready -U postgres" ] + interval: 5s + timeout: 5s + retries: 5 grafana: container_name: lms-grafana build: @@ -59,6 +65,8 @@ services: - lms-network profiles: - fuzzing + depends_on: + - botalka networks: lms-network: driver: bridge \ No newline at end of file