semaphoreui / semaphore

Modern UI for Ansible, Terraform, OpenTofu, Bash, Pulumi.
https://semaphoreui.com
MIT License
10.25k stars 1.03k forks source link

Problem: Docker env variable not reported in config.json #2158

Open ksourdrille opened 2 months ago

ksourdrille commented 2 months ago

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 commented 1 month ago

Hi @fiftin,

any help on this issue ?

xBounceIT commented 4 days ago

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.