Your Okta URL must start with https. Current value: $OKTA_OAUT ---- deploiement SPA spring boot +angular

Hellooo Teams,
i tried to do an okta environment key outsourcing to a yml file.
so in angular module
I have
oktaConfig: {
issuer: ‘$OKTA_OAUTH2_ISSUER’,
redirectUri: window.location.origin.concat(’/myappl/authSuccess’),
clientId: ‘$OKTA_OAUTH2_CLIENT_ID’,
scope: ‘openid’
}
in my file .yml used for start dockerImage i have
OKTA_OAUTH2_ISSUER: ${OKTA_OAUTH2_ISSUER}
OKTA_OAUTH2_CLIENT_ID: ${OKTA_OAUTH2_CLIENT_ID}

in my container i have war embded front + backend Spa

I also have another file okt.env in foulder docker
OKTA_OAUTH2_ISSUER=https://xxxxx.okta.com/oauth2/default
OKTA_OAUTH2_CLIENT_ID=xxxxxxxxyyyyy

when i deploy I have error

Your Okta URL must start with https. Current value: $OKTA_OAUT

c1

based on the error and the oktaConfig details posted, it looks like the issuer and clientId parameters in oktaConfig are not pointing to those OKTA_OAUTH2 type variables and are instead literal strings of those variable names

yes Fuzzard I do not know why
@mraible do you have any idea :slight_smile:

I followed the link

Are you using Docker Compose to start your app? If so, I believe you need to rename your okta.env file to .env. Environment variables in Compose | Docker Documentation

I use
stage(‘Docker Stack Deploy’) {
steps {
script {
withDockerRegistry([credentialsId: ‘a704b793-0e75-4f91-8b41-2125ff7696a4’, url: “http://${PORTUS_URL}”]) {
docker.withServer(‘tcp://192.83.83.3:2376’, ‘berjkkl-8f13-4b93-a01f-b2422d1095ac’) {
sh “”"
cd back/target
docker login --username ${PORTUS_USER} --password ${PORTUS_PWD} ${PORTUS_URL}
docker stack deploy --with-registry-auth --compose-file ${STACK_FILE} ${STACK_NAME}
“”"
}
}
}
}
}

It looks like you’re just running Docker commands. I don’t think they support an .env file like Docker Compose does.