Skip to content

Commit

Permalink
[+] produce "latest" and semver tags for all Docker images (#556)
Browse files Browse the repository at this point in the history
[+] mention pgwatch-demo in README as a Quick Start
  • Loading branch information
pashagolub authored Oct 11, 2024
1 parent 2e0b46d commit 4602840
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 14 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ jobs:
fail-fast: true
matrix:
image: [
{file: 'Dockerfile', tag: ''},
{file: 'demo/Dockerfile', tag: '-demo'}
{file: 'Dockerfile', prefix: ''},
{file: 'demo/Dockerfile', prefix: '-demo'}
]
runs-on: ubuntu-latest
steps:
Expand All @@ -62,7 +62,7 @@ jobs:
VERSION: ${{ github.ref_name }}
GIT_TIME: ${{ steps.version.outputs.RELEASE_TIME }}
with:
name: cybertecpostgresql/pgwatch${{ matrix.image.tag }}
name: cybertecpostgresql/pgwatch${{ matrix.image.prefix }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
dockerfile: docker/${{ matrix.image.file }}
Expand All @@ -71,14 +71,14 @@ jobs:
platforms: linux/amd64,linux/arm64

- name: Publish "latest" tag to Registry
if: ${{ !contains(github.ref_name, 'beta') && matrix.image.tag == '-demo' }}
if: ${{ !contains(github.ref_name, 'beta') }}
uses: elgohr/Publish-Docker-Github-Action@v5
env:
GIT_HASH: ${{ github.sha }}
VERSION: ${{ github.ref_name }}
GIT_TIME: ${{ steps.version.outputs.RELEASE_TIME }}
with:
name: cybertecpostgresql/pgwatch${{ matrix.image.tag }}
name: cybertecpostgresql/pgwatch${{ matrix.image.prefix }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
dockerfile: docker/${{ matrix.image.file }}
Expand All @@ -87,14 +87,14 @@ jobs:
platforms: linux/amd64,linux/arm64

- name: Publish "X.X.X, X.X, X" tags to Registry
if: ${{ !contains(github.ref_name, 'beta') && matrix.image.tag == '' }}
if: ${{ !contains(github.ref_name, 'beta') }}
uses: elgohr/Publish-Docker-Github-Action@v5
env:
GIT_HASH: ${{ github.sha }}
VERSION: ${{ github.ref_name }}
GIT_TIME: ${{ steps.version.outputs.RELEASE_TIME }}
with:
name: cybertecpostgresql/pgwatch${{ matrix.image.tag }}
name: cybertecpostgresql/pgwatch${{ matrix.image.prefix }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
dockerfile: docker/${{ matrix.image.file }}
Expand Down
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,25 @@ This is the next generation of [pgwatch2](https://github.com/cybertec-postgresql

## Quick Start

For the fastest development experience the Docker compose file is provided:
To fetch and run the latest **demo** Docker image, exposing
- Grafana on port 3000,
- the administrative web UI on port 8080,
- the internal configuration and metrics database on port 5432:

```shell
docker run -d --name pw3 -p 5432:5432 -p 3000:3000 -p 8080:8080 -e PW_TESTDB=true cybertecpostgresql/pgwatch-demo
```

After some minutes you could open the ["Database Overview"](http://127.0.0.1:3000/dashboard/db/db-overview) dashboard and start looking at metrics. For defining your own dashboards you need to log in Grafana as admin (`admin`/`pgwatchadmin`).

If you don't want to add the test database for monitoring, remove the `NOTESTDB=1` parameter when launching the container.



## Development and production use

For production and long term installation `cybertecpostgresql/pgwatch` Docker image should be used.
For the fastest development and deployment experience the Docker compose files are provided:

```shell
git clone https://github.com/cybertec-postgresql/pgwatch.git && cd pgwatch
Expand Down
12 changes: 6 additions & 6 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ Launching the latest pgwatch Docker image with built-in Postgres
metrics storage DB:

# run the latest Docker image, exposing Grafana on port 3000 and the administrative web UI on 8080
docker run -d -p 3000:3000 -p 8080:8080 -e PW_TESTDB=true --name pw3 cybertec/pgwatch
docker run -d --name pw3 -p 5432:5432 -p 3000:3000 -p 8080:8080 -e PW_TESTDB=true cybertecpostgresql/pgwatch-demo

After some minutes you could for example open the [DB
overview](http://127.0.0.1:3000/dashboard/db/db-overview) dashboard
After some minutes you could for example open the ["Database
Overview"](http://127.0.0.1:3000/dashboard/db/db-overview) dashboard
and start looking at metrics in Grafana. For defining your own
dashboards or making changes you need to log in as admin (default
user/password: `admin/pgwatchadmin`).
dashboards or making changes you need to log in Grafana as admin (default
user/password: `admin`/`pgwatchadmin`).

If you don't want to add the `"test"` database (the pgwatch
If you don't want to add the `test` database (the pgwatch
configuration DB holding connection strings to monitored DBs and metric
definitions) to monitoring, remove the `PW_TESTDB` env variable.

Expand Down

0 comments on commit 4602840

Please sign in to comment.