Skip to content

Commit

Permalink
Merge pull request #6215 from pmattmann/feature/pg-admin
Browse files Browse the repository at this point in the history
Add pg-admin
  • Loading branch information
pmattmann authored Oct 27, 2024
2 parents 9136874 + 70c7d9d commit 1189916
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/reusable-e2e-tests-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
- [email protected]
- 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'
Expand Down
15 changes: 15 additions & 0 deletions pgadmin-servers.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
7 changes: 7 additions & 0 deletions reverse-proxy-nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1189916

Please sign in to comment.