Skip to content

Commit c025490

Browse files
DanCechxlson
authored andcommitted
move run script, update README
1 parent 96d6657 commit c025490

File tree

3 files changed

+23
-11
lines changed

3 files changed

+23
-11
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ COPY --from=1 /usr/src/app/tools ./tools
6969

7070
EXPOSE 3000
7171

72-
COPY ./docker/run.sh /run.sh
72+
COPY ./scripts/docker/run.sh /run.sh
7373

7474
USER grafana
7575
ENTRYPOINT [ "/run.sh" ]

README.md

+22-10
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ To build the assets, rebuild on file change, and serve them by Grafana's webserv
4343
```bash
4444
npm install -g yarn
4545
yarn install --pure-lockfile
46-
npm run watch
46+
yarn run watch
4747
```
4848

4949
Build the assets, rebuild on file change with Hot Module Replacement (HMR), and serve them by webpack-dev-server (http://localhost:3333):
@@ -54,14 +54,14 @@ env GRAFANA_THEME=light yarn start
5454
```
5555
Note: HMR for Angular is not supported. If you edit files in the Angular part of the app, the whole page will reload.
5656

57-
Run tests
57+
Run tests
5858
```bash
59-
npm run jest
59+
yarn run jest
6060
```
6161

6262
Run karma tests
6363
```bash
64-
npm run karma
64+
yarn run karma
6565
```
6666

6767
### Recompile backend on source change
@@ -98,30 +98,42 @@ In your custom.ini uncomment (remove the leading `;`) sign. And set `app_mode =
9898
#### Frontend
9999
Execute all frontend tests
100100
```bash
101-
npm run test
101+
yarn run test
102102
```
103103

104104
Writing & watching frontend tests (we have two test runners)
105105

106106
- jest for all new tests that do not require browser context (React+more)
107-
- Start watcher: `npm run jest`
107+
- Start watcher: `yarn run jest`
108108
- Jest will run all test files that end with the name ".jest.ts"
109109
- karma + mocha is used for testing angularjs components. We do want to migrate these test to jest over time (if possible).
110-
- Start watcher: `npm run karma`
110+
- Start watcher: `yarn run karma`
111111
- Karma+Mocha runs all files that end with the name "_specs.ts".
112112

113113
#### Backend
114114
```bash
115115
# Run Golang tests using sqlite3 as database (default)
116-
go test ./pkg/...
116+
go test ./pkg/...
117117

118118
# Run Golang tests using mysql as database - convenient to use /docker/blocks/mysql_tests
119-
GRAFANA_TEST_DB=mysql go test ./pkg/...
119+
GRAFANA_TEST_DB=mysql go test ./pkg/...
120120

121121
# Run Golang tests using postgres as database - convenient to use /docker/blocks/postgres_tests
122-
GRAFANA_TEST_DB=postgres go test ./pkg/...
122+
GRAFANA_TEST_DB=postgres go test ./pkg/...
123123
```
124124

125+
## Building custom docker image
126+
127+
You can build a custom image using Docker, which doesn't require installing any dependencies besides docker itself.
128+
```bash
129+
git clone https://github.com/grafana/grafana
130+
cd grafana
131+
docker build -t grafana:dev .
132+
docker run -d --name=grafana -p 3000:3000 grafana:dev
133+
```
134+
135+
Open grafana in your browser (default: `http://localhost:3000`) and login with admin user (default: `user/pass = admin/admin`).
136+
125137
## Contribute
126138

127139
If you have any idea for an improvement or found a bug, do not hesitate to open an issue.
File renamed without changes.

0 commit comments

Comments
 (0)