Author : Artem

I’m trying to launch my Ktor backend app in Docker. But I have an exception on app start: java.lang.IllegalStateException: No Koin Context configured. Please use startKoin or koinApplication DSL. at org.koin.core.context.KoinContextHandler.getContext(KoinContextHandler.kt:29) at org.koin.core.context.KoinContextHandler.get(KoinContextHandler.kt:35) at org.koin.ktor.ext.KtorApplicationExtKt.getKoin(KtorApplicationExt.kt:34) at com.widgets.ApplicationKt$module$$inlined$inject$1.invoke(KtorApplicationExt.kt:77) at kotlin.UnsafeLazyImpl.getValue(Lazy.kt:81) at com.widgets.ApplicationKt$module$4.invoke(Application.kt:117) at com.widgets.ApplicationKt$module$4.invoke(Application.kt) at io.ktor.auth.Authentication.configure(Authentication.kt:77) at io.ktor.auth.Authentication$Feature.install(Authentication.kt:165) at io.ktor.auth.Authentication$Feature.install(Authentication.kt:148) at io.ktor.application.ApplicationFeatureKt.install(ApplicationFeature.kt:68) at com.widgets.ApplicationKt.module(Application.kt:116) at com.widgets.ApplicationKt.module$default(Application.kt:91) ..

Read more

I have the following docker-compose.yml: version: ‘3.7’ services: backend: image: ${REGISTRY_HOST}/backend:0.0.1 environment: DB_HOST: "db" DB_USER: "user" DB_NAME: "name" DB_PORT: 5432 DB_PASSWORD: ${POSTGRES_PASSWORD} SECRET_KEY: ${SECRET_KEY} APP_DEBUG: ${APP_DEBUG} STATIC_ROOT: "/data/static" MEDIA_ROOT: "/data/media" ports: – "8000:8000" restart: always depends_on: – db volumes: – ./docker/data/static:/data/static – ./docker/data/media:/data/media networks: – backend – db db: image: postgres:13.1-alpine ports: – "5432:5432" restart: ..

Read more