Skip to content

Commit

Permalink
fix scripts (#73)
Browse files Browse the repository at this point in the history
* fix scripts
  • Loading branch information
chicco785 authored Aug 12, 2022
1 parent 0f403c6 commit 8dddf0b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ docker run -it --rm -v "$PWD":/usr/src/app -w /usr/src/app node:14 yarn install
1. Launch services

```bash
docker compose up -d
docker compose -p map-panel up -d
```

2. Import database
Expand All @@ -63,7 +63,7 @@ docker run -it --rm -v "$PWD":/usr/src/app -w /usr/src/app node:14 yarn install
4. In case of changes to code to restart grafana

```bash
yarn dev && docker compose restart grafana
yarn dev && docker compose -p map-panel restart grafana
```

**NOTE:** Unless you remove the docker volumes, you need to run the last two
Expand All @@ -76,7 +76,7 @@ able to see a dashboard called `Dashboard Map`.

- `Compile the code` + restart grafana
```sh
$ yarn dev && docker compose restart grafana
$ yarn dev && docker compose -p map-panel restart grafana
```

Or using docker:
Expand Down
2 changes: 1 addition & 1 deletion clean_db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ curl -sS -H 'Content-Type: application/json' \
-d '{"stmt":"drop table example;"}'

echo 'clean timescaledb'
docker exec -ti grafana-map-plugin-timescale-1 dropdb ecom -U postgres
docker exec -ti map-panel-timescale-1 dropdb ecom -U postgres
4 changes: 2 additions & 2 deletions populate_db.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#bash
echo 'populate timescale db'
docker exec -ti grafana-map-plugin-timescale-1 createdb ecom -U postgres
docker exec -ti grafana-map-plugin-timescale-1 psql -U postgres --dbname ecom -f /db-init/ekz-airquality-import.sql
docker exec -ti map-panel-timescale-1 createdb ecom -U postgres
docker exec -ti map-panel-timescale-1 psql -U postgres --dbname ecom -f /db-init/ekz-airquality-import.sql
echo 'populate crate db'
source ./db-init/create-table.sh

0 comments on commit 8dddf0b

Please sign in to comment.