Skip to content

Commit 70c7d9d

Browse files
committed
Add pg-admin
1 parent 77e36e5 commit 70c7d9d

File tree

4 files changed

+35
-1
lines changed

4 files changed

+35
-1
lines changed

.github/workflows/reusable-e2e-tests-run.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
- run: docker compose -f docker-compose.yml run --rm api migrate-database
6565

6666
# start necessary containers
67-
- run: docker compose -f docker-compose.yml up -d api frontend pdf print browserless database docker-host http-cache mail reverse-proxy
67+
- run: docker compose -f docker-compose.yml up -d api frontend pdf print browserless database docker-host http-cache mail pg-admin reverse-proxy
6868

6969
# pull cypress while container are starting up
7070
- run: docker compose pull e2e

docker-compose.yml

+12
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,18 @@ services:
131131
memory: ${DB_MEMORY_LIMIT:-128G}
132132
cpus: ${DB_CPU_LIMIT:-8}
133133

134+
pg-admin:
135+
image: dpage/pgadmin4
136+
container_name: 'ecamp3-pg-admin'
137+
depends_on:
138+
- database
139+
environment:
140+
141+
- PGADMIN_DEFAULT_PASSWORD=admin
142+
- PGADMIN_CONFIG_ENABLE_SERVER_PASS_EXEC_CMD=True
143+
volumes:
144+
- ./pgadmin-servers.json:/pgadmin4/servers.json
145+
134146
mail:
135147
image: maildev/maildev
136148
container_name: 'ecamp3-mail'

pgadmin-servers.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"Servers": {
3+
"1": {
4+
"Group": "Servers",
5+
"Name": "ecamp3-database",
6+
"Host": "database",
7+
"Port": 5432,
8+
"Username": "ecamp3",
9+
"PasswordExecCommand": "echo 'ecamp3'",
10+
"MaintenanceDB": "postgres",
11+
"SSLMode": "prefer",
12+
"DBRestriction": "ecamp3dev"
13+
}
14+
}
15+
}

reverse-proxy-nginx.conf

+7
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ http {
5353
proxy_set_header Upgrade $http_upgrade;
5454
proxy_set_header Connection $connection_upgrade;
5555
}
56+
57+
location /pgadmin/ {
58+
proxy_set_header X-Script-Name /pgadmin;
59+
proxy_set_header Host $host;
60+
proxy_pass http://pg-admin:80/;
61+
proxy_redirect off;
62+
}
5663
}
5764
server {
5865
listen 3004;

0 commit comments

Comments
 (0)