diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fc19686f7..ab84d99c0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -56,6 +56,16 @@ For example: `docker-compose -f ./docker-compose.zaakbrug.dev.yml -f ./docker-co > Note: Database data is not seamlessly shared with the Frank!Runner out-off-the-box. In `src/webapp/META_INF/context.xml` you can comment out the H2 configuration and uncomment the Postgress one. The Frank!Runner will then use the Postgres database used in the docker-compose. +#### PgAdmin4 +To aid with debugging you can use PgAdmin4 to browse/edit the Postgres database. PgAdmin4 is included and pre-configured in `docker-compose.zaakbrug.postgres` and can be enabled by adding `--profile pgadmin` to your `docker-compose up` command. + +The PgAdmin4 web-GUI is exposed on port `5050`, so can be accessed with `localhost:5050` or `host.docker.internal:5050` + +**default login:** +email: `admin@wearefrank.nl` +password: `admin` + +For example: `docker-compose -f ./docker-compose.zaakbrug.dev.yml -f ./docker-compose.zaakbrug.postgres.yml --profile pgadmin up --build` ## docker-compose.zaakbrug.staging.dev Contains an instance of OpenZaak specifically configured to act as cache or staging for ZGW to ZDS translations. It shares a network with ZaakBrug, and should be considered a component of the ZaakBrug deployment for when ZGW to ZDS translations are required. diff --git a/docker-compose.zaakbrug.postgres.yml b/docker-compose.zaakbrug.postgres.yml index a4660e0c7..628518e3d 100644 --- a/docker-compose.zaakbrug.postgres.yml +++ b/docker-compose.zaakbrug.postgres.yml @@ -18,6 +18,23 @@ services: - zaakbrug-backend volumes: - zaakbrug-postgres-data:/var/lib/postgresql/data + + zaakbrug-pgadmin: + profiles: + - pgadmin + image: dpage/pgadmin4:${PGADMIN_VERSION:-latest} + user: root + command: ["/venv/bin/python3", "/pgadmin4/setup.py", "--load-servers", "zaakbrug-pgadmin-conf.json", "--user", "admin@wearefrank.nl"] + ports: + - 5050:80 + environment: + PGADMIN_DEFAULT_EMAIL: admin@wearefrank.nl + PGADMIN_DEFAULT_PASSWORD: admin + networks: + - zaakbrug-stack + - zaakbrug-backend + depends_on: + - zaakbrug-postgres zaakbrug: environment: diff --git a/docker/zaakbrug-postgres/zaakbrug-pgadmin-conf.json b/docker/zaakbrug-postgres/zaakbrug-pgadmin-conf.json new file mode 100644 index 000000000..c04d65d61 --- /dev/null +++ b/docker/zaakbrug-postgres/zaakbrug-pgadmin-conf.json @@ -0,0 +1,22 @@ +{ + "Servers": { + "1": { + "Name": "zaakbrug-postgres", + "Group": "Servers", + "Host": "zaakbrug-postgres", + "Port": 5432, + "MaintenanceDB": "postgres", + "Username": "zaakbrug", + "UseSSHTunnel": 0, + "TunnelPort": "22", + "TunnelAuthentication": 0, + "KerberosAuthentication": false, + "ConnectionParameters": { + "sslmode": "prefer", + "connect_timeout": 10, + "sslcert": "/.postgresql/postgresql.crt", + "sslkey": "/.postgresql/postgresql.key" + } + } + } +} \ No newline at end of file