Skip to content

Commit

Permalink
test(docker-compose): add optional pgadmin behind profile for openfo…
Browse files Browse the repository at this point in the history
…rms2bpel postgres db
  • Loading branch information
MLenterman committed Sep 27, 2023
1 parent d808b7d commit 585270f
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
11 changes: 11 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,17 @@ 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.

Expand Down
17 changes: 17 additions & 0 deletions docker-compose.zaakbrug.postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,23 @@ services:
volumes:
- openforms2bpel-postgres-data:/var/lib/postgresql/data

openforms2bpel-pgadmin:
profiles:
- pgadmin
image: dpage/pgadmin4:${PGADMIN_VERSION:-latest}
user: root
command: ["/venv/bin/python3", "/pgadmin4/setup.py", "--load-servers", "openforms2bpel-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:
- openforms2bpel-postgres

openforms2bpel:
environment:
<<: *openforms2bpel-postgres-env
Expand Down
22 changes: 22 additions & 0 deletions docker/openforms2bpel-postgres/openforms2bpel-pgadmin-conf.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"Servers": {
"1": {
"Name": "openforms2bpel-postgres",
"Group": "Servers",
"Host": "openforms2bpel-postgres",
"Port": 5432,
"MaintenanceDB": "postgres",
"Username": "openforms2bpel",
"UseSSHTunnel": 0,
"TunnelPort": "22",
"TunnelAuthentication": 0,
"KerberosAuthentication": false,
"ConnectionParameters": {
"sslmode": "prefer",
"connect_timeout": 10,
"sslcert": "<STORAGE_DIR>/.postgresql/postgresql.crt",
"sslkey": "<STORAGE_DIR>/.postgresql/postgresql.key"
}
}
}
}

0 comments on commit 585270f

Please sign in to comment.