Skip to content

[Bug] Docker Entrypoint Not Interpolating Variables #7300

@ardichoke

Description

@ardichoke

Describe the bug

When using FRESHRSS_INSTALL and FRESHRSS_USER to do initial configuration inside a Docker container, any variables passed into the flags are not being interpolated. So, if you pass the DB password in as an environment variable (ex: DB_PASSWORD="foobarbaz") and then use --db-password ${DB_PASSWORD}, it will fail setup because it is trying to literally use the string "${DB_PASSWORD}" to authenticate.

This bit me when setting freshrss up in a k8s cluster connecting to a mysql pod, I stored my passwords in a cluster secret, loaded the secret into an env variable and then attempted to pass the env variable into the install flag and was perplexed for longer than I'd care to admit about why mysql was saying the password was wrong.

To Reproduce

  1. Pass a setup value into the pod as an environment variable
  2. Configure the setup flag to use the environment variable
  3. Behold, it uses the literal variable name, instead of the value of the variable

Expected behavior

Proper variable interpolation when running the setup commands.

FreshRSS version

1.25.0

System information

  • Database version: Mariadb 11.4
  • Docker Image: lts
  • Installation type: Docker

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug (unconfirmed)issues that could not be reproduced yetDocker 🐋Everything related to Docker

    Type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions