Skip to content

When using this image and importing ENV for TTL and CRON it puts and "=" at the end thus setting the ENV improperly #16

@scrummie02

Description

@scrummie02

When setting the following in an ENV file and using compose like so:

openldap:
    image: osixia/openldap-backup:1.5.0
    hostname: ldap1.example.com
    volumes:
      - /path/to/ldap_db:/var/lib/ldap
      - /path/to/ldap_config:/etc/ldap/slapd.d
      - /path/to/data/backup:/data/backup
    environment:
      - LDAP_ORGANISATION=example-com
      - LDAP_DOMAIN=example.com
      - LDAP_ADMIN_PASSWORD=verysecretadminpassword
      - LDAP_CONFIG_PASSWORD=verysecretconfigpassword
      - LDAP_RFC2307BIS_SCHEMA=true
      - LDAP_REMOVE_CONFIG_AFTER_SETUP=true
      - LDAP_TLS_VERIFY_CLIENT=never
      - LDAP_BACKEND=mdb
      #- LDAP_REPLICATION=true
    env_file:
      - .env
    ports:
      - "389:389"
      - "636:636"
    networks:
      - openldap

And using this in the .env file

# Backup config and data every day at 4:00am
LDAP_BACKUP_CONFIG_CRON_EXP: 0 4 * * *
LDAP_BACKUP_DATA_CRON_EXP: 0 4 * * *

# Delete backups that are over 15 days
LDAP_BACKUP_TTL: 15

# Upload backups to S3
UPLOAD_TO_S3: false
S3_PATH: bucket/key-folder

It sets up an file called /container/run/environment.sh

After looking at the file because the backup jobs don't run I see this
export LDAP_BACKUP_TTL=15=
export LDAP_BACKUP_DATA_CRON_EXP='0 4 * * *='
...
export S3_PATH=bucket/key-folder=
export LDAP_BACKUP_CONFIG_CRON_EXP='0 4 * * *='

I had to update apt and install nano/vi whatever and edit envrionment.sh and run again. It seems like the parsing throws in an "=" at the end of those variables...but just those ones, the other ones are fine. So if I had an S3 backups for example the folder wouldn't be reachable because of the "=" being parsed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions