Merge pull request #113 from AppFlowy-IO/pgadmin-conf

Pgadmin conf
This commit is contained in:
Zack 2023-10-13 09:47:24 +08:00 committed by GitHub
commit 03a2de11e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 29 deletions

View File

@ -22,17 +22,16 @@ services:
- ./migrations/before:/docker-entrypoint-initdb.d
pgadmin:
build:
context: .
dockerfile: docker/pgadmin.Dockerfile
image: dpage/pgadmin4
depends_on:
- postgres
environment:
- PGADMIN_DEFAULT_EMAIL=${PGADMIN_DEFAULT_EMAIL}
- PGADMIN_DEFAULT_PASSWORD=${PGADMIN_DEFAULT_PASSWORD}
- PGADMIN_CONFIG_WTF_CSRF_ENABLED=False
ports:
- 5400:80
volumes:
- ./docker/pgadmin/servers.json:/pgadmin4/servers.json
redis:
image: redis

View File

@ -36,17 +36,16 @@ services:
- ./migrations/before:/docker-entrypoint-initdb.d
pgadmin:
build:
context: .
dockerfile: docker/pgadmin.Dockerfile
image: dpage/pgadmin4
depends_on:
- postgres
environment:
- PGADMIN_DEFAULT_EMAIL=${PGADMIN_DEFAULT_EMAIL}
- PGADMIN_DEFAULT_PASSWORD=${PGADMIN_DEFAULT_PASSWORD}
- PGADMIN_CONFIG_WTF_CSRF_ENABLED=False
ports:
- 5400:80
volumes:
- ./docker/pgadmin/servers.json:/pgadmin4/servers.json
redis:
image: redis

View File

@ -1,11 +0,0 @@
FROM dpage/pgadmin4
COPY ./docker/pgadmin/servers.json /pgadmin4/servers.json
COPY ./docker/pgadmin/custom_entrypoint.sh /custom_entrypoint.sh
USER root
RUN chmod +x /custom_entrypoint.sh
USER pgadmin
ENTRYPOINT ["/custom_entrypoint.sh"]

View File

@ -1,10 +0,0 @@
#!/bin/sh
# Call the original entrypoint
/entrypoint.sh "$@"
# Your additional commands to invoke setup.py (example below, adjust accordingly)
python setup.py --load-servers /path/to/your/servers.json
# Keep container running
tail -f /dev/null

View File

@ -41,7 +41,10 @@ http {
# PgAdmin
location /pgadmin/ {
proxy_set_header X-Script-Name /pgadmin;
proxy_set_header X-Scheme $scheme;
proxy_set_header Host $host;
proxy_pass http://pgadmin:80/;
proxy_redirect off;
}
# Admin Frontend