Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add server mode #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ This image can be configured at runtime, by setting environment variables;
- `PG_ADMIN_PORT` port to listen on (defaults to `5050`)
- `PG_ADMIN_SESSION_DIR` directory to use for storing server-side sessions (defaults to `/dev/shm/pgAdmin4_session`)
- `DEBUG` enable debug mode (detaults to `False`)
- `SERVER_MODE` enable server mode (detaults to `False` - docker run -d -p 5050:5050 -e PGADMIN_SETUP_EMAIL=pgadmin4@pgadmin.org -e PGADMIN_SETUP_PASSWORD=admin -e SERVER_MODE=true thajeztah/pgadmin4)

More information on pgAdmin 4 development can be found here;

Expand Down
5 changes: 4 additions & 1 deletion config_distro.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@
# Server settings
##########################################################################

SERVER_MODE = False
if strtobool(os.getenv('SERVER_MODE', "false")) and "PGADMIN_SETUP_EMAIL" in os.environ and "PGADMIN_SETUP_PASSWORD" in os.environ:
SERVER_MODE = True
else:
SERVER_MODE = False

DEFAULT_SERVER = '0.0.0.0'
DEFAULT_SERVER_PORT = int(os.getenv('PG_ADMIN_PORT', 5050))
Expand Down