grafana / grafana/plugin-tools

Bug: Environment flag not respected when starting the Grafana server

Open
#2,171 1 comment 0 reactions 0 assignees View on GitHub
no stalebot type/bug
Dominant language
TypeScript
Stars
89
Forks
57
Avg merge
3d 17h
Merged PRs (30d)
37

Description

### Which package(s) does this bug affect?

- [x] Create Plugin
- [ ] Sign Plugin
- [ ] Plugin E2E
- [ ] Plugin Meta Extractor
- [ ] Plugin ESLint Rules

### Package versions

```shell
create-plugin@5.26.9
```

### What happened?

When you change the `development` flag, to get Grafana to run in production, while running docker-compose it won't be respected. Looks like one of the reasons is line 19 in the `.config/Dockerfile`. It is setting the `ENV GF_DEFAULT_APP_MODE "development"` always regardless of what the passed development flag is set to.

### What you expected to happen

I want to test running Grafana in production mode.

### How to reproduce it (as minimally and precisely as possible)

1. Scaffold a new plugin
2. Try to build the plugin and run Grafana in production mode.
3. Open the browser and inspect the build settings
4. The buildInfo.env flag is still set to `development`

### Environment

```shell
n/a
```

### Additional context

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.