semaphore icon indicating copy to clipboard operation
semaphore copied to clipboard

Problem: Docker env variable not reported in config.json

Open ksourdrille opened this issue 1 year ago • 4 comments

Issue

Hello,

I'm facing a problem when configuring semaphore with docker, I tried to use environment variables to configure LDAP, mails, encryption key.

But the elements entered in the docker-compose.yml file are not passed on to the semaphore config.json file.

I start the semaphore container with all the parameters and display the /etc/semaphore/config.json file present in the container but empty except for the database configuration.

Below are the environment variables used:

SEMAPHORE_ACCESS_KEY_ENCRYPTION: 
SEMAPHORE_EMAIL_ALERT: 
SEMAPHORE_EMAIL_SENDER: 
SEMAPHORE_EMAIL_HOST: 
SEMAPHORE_EMAIL_PORT: 
SEMAPHORE_EMAIL_USERNAME: 
SEMAPHORE_EMAIL_PASSWORD: 
SEMAPHORE_EMAIL_SECURE:
SEMAPHORE_LDAP_ENABLE: 
SEMAPHORE_LDAP_BIND_DN: 
SEMAPHORE_LDAP_BIND_PASSWORD: 
SEMAPHORE_LDAP_SERVER: 
SEMAPHORE_LDAP_SEARCH_DN: 
SEMAPHORE_LDAP_SEARCH_FILTER: 
SEMAPHORE_LDAP_NEEDTLS: 
SEMAPHORE_LDAP_MAPPING_DN: 
SEMAPHORE_LDAP_MAPPING_MAIL: 
SEMAPHORE_LDAP_MAPPING_UID: 
SEMAPHORE_LDAP_MAPPING_CN: 

There are already issues (#1522 #2088) but there are no solutions, so I'm opening mine.

I'm still available if you need me for testing.

(same with latest version 2.10.11)

Impact

Configuration, Docker

Installation method

Docker

Database

MySQL

Browser

Firefox, Chrome, Microsoft Edge

Semaphore Version

2.9.64

Ansible Version

No response

Logs & errors

No response

Manual installation - system information

No response

Configuration

No response

Additional information

No response

ksourdrille avatar Jul 02 '24 09:07 ksourdrille

Hi @fiftin,

any help on this issue ?

ksourdrille avatar Jul 22 '24 14:07 ksourdrille

same, i have setup my docker-compose with environment varialbes but if i set SEMAPHORE_LDAP_ACTIVATED to yes it crashes on startup for missing config file, if i set it to no it starts but the content of config.json is missing the ldap environment variables.

xBounceIT avatar Sep 04 '24 14:09 xBounceIT

Hello,

The issue is SEMAPHORE_LDAP_BIND_DN is not copying data into ldap_binddn and crash Semaphore container. Many people reported they had to manually setup a config,json to avoid this bug.

@fiftin Could you take this issue into account?

Thank you.

Tetrameter avatar Sep 19 '24 19:09 Tetrameter

Do you see those values when in the container running "env" ?

mirozbiro avatar Apr 26 '25 01:04 mirozbiro

Do you see those values when in the container running "env" ?

Hello, yes, when i use docker inspect ...

Image

For the moment i've bind it in the config.json, but using it this way would be nice too.

ksourdrille avatar Apr 28 '25 07:04 ksourdrille

Same issue in the latest version of semaphore ui and no news about this.... @fiftin

ksourdrille avatar Oct 09 '25 11:10 ksourdrille