Skip to content

Commit fa6922e

Browse files
committed
Create a server.json for import on startup
1 parent ce65057 commit fa6922e

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

Dockerfile

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,27 @@ USER root
33
RUN setcap -r /usr/bin/python3.11
44
ENV PGADMIN_LISTN_ADDRESS=0.0.0.0
55
ENV PGADMIN_DISABLE_POSTFIX=true
6+
7+
COPY <<EOF /pgadmin4/pgpassfile
8+
${PGADMIN_DATABASE_NAME}:5432:${PGADMIN_DATABASE_USER}:${PGADMIN_DATABASE_PASSWORD}
9+
EOF
10+
11+
COPY <<EOF /pgadmin4/servers.json
12+
{
13+
"Servers": {
14+
"1": {
15+
"Name": "${PGADMIN_DATABASE_NAME}",
16+
"Group": "Servers",
17+
"Port": 5432,
18+
"Username": "${PGADMIN_DATABASE_USER}",
19+
"PassFile": "/pgadmin4/pgpassfile",
20+
"Host": "${PGADMIN_DATABASE_HOST}",
21+
"SSLMode": "prefer",
22+
"MaintenanceDB": "postgres"
23+
}
24+
}
25+
}
26+
27+
EOF
28+
629
USER pgadmin

0 commit comments

Comments
 (0)