Commit c0254905 by Dan Cech Committed by Leonard Gram

move run script, update README

parent 96d6657b
...@@ -69,7 +69,7 @@ COPY --from=1 /usr/src/app/tools ./tools ...@@ -69,7 +69,7 @@ COPY --from=1 /usr/src/app/tools ./tools
EXPOSE 3000 EXPOSE 3000
COPY ./docker/run.sh /run.sh COPY ./scripts/docker/run.sh /run.sh
USER grafana USER grafana
ENTRYPOINT [ "/run.sh" ] ENTRYPOINT [ "/run.sh" ]
...@@ -43,7 +43,7 @@ To build the assets, rebuild on file change, and serve them by Grafana's webserv ...@@ -43,7 +43,7 @@ To build the assets, rebuild on file change, and serve them by Grafana's webserv
```bash ```bash
npm install -g yarn npm install -g yarn
yarn install --pure-lockfile yarn install --pure-lockfile
npm run watch yarn run watch
``` ```
Build the assets, rebuild on file change with Hot Module Replacement (HMR), and serve them by webpack-dev-server (http://localhost:3333): Build the assets, rebuild on file change with Hot Module Replacement (HMR), and serve them by webpack-dev-server (http://localhost:3333):
...@@ -56,12 +56,12 @@ Note: HMR for Angular is not supported. If you edit files in the Angular part of ...@@ -56,12 +56,12 @@ Note: HMR for Angular is not supported. If you edit files in the Angular part of
Run tests Run tests
```bash ```bash
npm run jest yarn run jest
``` ```
Run karma tests Run karma tests
```bash ```bash
npm run karma yarn run karma
``` ```
### Recompile backend on source change ### Recompile backend on source change
...@@ -98,16 +98,16 @@ In your custom.ini uncomment (remove the leading `;`) sign. And set `app_mode = ...@@ -98,16 +98,16 @@ In your custom.ini uncomment (remove the leading `;`) sign. And set `app_mode =
#### Frontend #### Frontend
Execute all frontend tests Execute all frontend tests
```bash ```bash
npm run test yarn run test
``` ```
Writing & watching frontend tests (we have two test runners) Writing & watching frontend tests (we have two test runners)
- jest for all new tests that do not require browser context (React+more) - jest for all new tests that do not require browser context (React+more)
- Start watcher: `npm run jest` - Start watcher: `yarn run jest`
- Jest will run all test files that end with the name ".jest.ts" - Jest will run all test files that end with the name ".jest.ts"
- karma + mocha is used for testing angularjs components. We do want to migrate these test to jest over time (if possible). - karma + mocha is used for testing angularjs components. We do want to migrate these test to jest over time (if possible).
- Start watcher: `npm run karma` - Start watcher: `yarn run karma`
- Karma+Mocha runs all files that end with the name "_specs.ts". - Karma+Mocha runs all files that end with the name "_specs.ts".
#### Backend #### Backend
...@@ -122,6 +122,18 @@ GRAFANA_TEST_DB=mysql go test ./pkg/... ...@@ -122,6 +122,18 @@ GRAFANA_TEST_DB=mysql go test ./pkg/...
GRAFANA_TEST_DB=postgres go test ./pkg/... GRAFANA_TEST_DB=postgres go test ./pkg/...
``` ```
## Building custom docker image
You can build a custom image using Docker, which doesn't require installing any dependencies besides docker itself.
```bash
git clone https://github.com/grafana/grafana
cd grafana
docker build -t grafana:dev .
docker run -d --name=grafana -p 3000:3000 grafana:dev
```
Open grafana in your browser (default: `http://localhost:3000`) and login with admin user (default: `user/pass = admin/admin`).
## Contribute ## Contribute
If you have any idea for an improvement or found a bug, do not hesitate to open an issue. If you have any idea for an improvement or found a bug, do not hesitate to open an issue.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment