diff --git a/.github/workflows/reusable-e2e-tests-run.yml b/.github/workflows/reusable-e2e-tests-run.yml index f426c76c3b..f0819b0574 100644 --- a/.github/workflows/reusable-e2e-tests-run.yml +++ b/.github/workflows/reusable-e2e-tests-run.yml @@ -64,7 +64,7 @@ jobs: - run: docker compose -f docker-compose.yml run --rm api migrate-database # start necessary containers - - run: docker compose -f docker-compose.yml up -d api frontend pdf print browserless database docker-host http-cache mail reverse-proxy + - run: docker compose -f docker-compose.yml up -d api frontend pdf print browserless database docker-host http-cache mail pg-admin reverse-proxy # pull cypress while container are starting up - run: docker compose pull e2e diff --git a/docker-compose.yml b/docker-compose.yml index 0830ee320a..afe23cf2a0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -131,6 +131,18 @@ services: memory: ${DB_MEMORY_LIMIT:-128G} cpus: ${DB_CPU_LIMIT:-8} + pg-admin: + image: dpage/pgadmin4 + container_name: 'ecamp3-pg-admin' + depends_on: + - database + environment: + - PGADMIN_DEFAULT_EMAIL=admin@ecamp3.ch + - PGADMIN_DEFAULT_PASSWORD=admin + - PGADMIN_CONFIG_ENABLE_SERVER_PASS_EXEC_CMD=True + volumes: + - ./pgadmin-servers.json:/pgadmin4/servers.json + mail: image: maildev/maildev container_name: 'ecamp3-mail' diff --git a/pgadmin-servers.json b/pgadmin-servers.json new file mode 100644 index 0000000000..d89a30fc11 --- /dev/null +++ b/pgadmin-servers.json @@ -0,0 +1,15 @@ +{ + "Servers": { + "1": { + "Group": "Servers", + "Name": "ecamp3-database", + "Host": "database", + "Port": 5432, + "Username": "ecamp3", + "PasswordExecCommand": "echo 'ecamp3'", + "MaintenanceDB": "postgres", + "SSLMode": "prefer", + "DBRestriction": "ecamp3dev" + } + } +} diff --git a/reverse-proxy-nginx.conf b/reverse-proxy-nginx.conf index 7fd4083240..fd4de2e763 100644 --- a/reverse-proxy-nginx.conf +++ b/reverse-proxy-nginx.conf @@ -53,6 +53,13 @@ http { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; } + + location /pgadmin/ { + proxy_set_header X-Script-Name /pgadmin; + proxy_set_header Host $host; + proxy_pass http://pg-admin:80/; + proxy_redirect off; + } } server { listen 3004;