Skip to content

Pass OSC_ENV to config-to-env CLI call #9

@birme

Description

@birme

Problem

When injecting environment variables from the config service, the entrypoint calls:

```bash
eval $(npx -y @osaas/cli@latest web config-to-env $CONFIG_SVC)
```

This call has no way to target a specific OSC environment. The CLI defaults to production. Apps running on non-prod environments (dev, stage) or apps that need to connect to a different environment's parameter store cannot override this.

Expected Behaviour

When `OSC_ENV` is set, pass it as `--env` to the CLI call so the parameter store is fetched from the correct OSC environment:

```bash
eval $(npx -y @osaas/cli@latest web config-to-env ${OSC_ENV:+--env "$OSC_ENV"} "$CONFIG_SVC")
```

When `OSC_ENV` is unset the behaviour is unchanged (CLI defaults to prod).

Fix Location

scripts/docker-entrypoint.sh — the line:

```bash
eval $(npx -y @osaas/cli@latest web config-to-env $CONFIG_SVC)
```

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions