A web app for writing and running SQL queries and visualizing the results. Supports Postgres, MySQL, SQL Server, Crate, Vertica, Presto, and SAP HANA. Other databases potentially supported via unix odbc support.
The docker image runs on port 3000 and uses
/var/lib/sqlpad for the embedded database directory.
For configuration exposed via environment variables reference CONFIGURATION.md.
See docker-validation directory for example docker-compose setup with SQL Server.
Install node 10 or later
Clone/download this repo
Install dependencies and build the UI
The gist of this script is:
# install root level dependencies using package-lock.json as reference npm ci # install front-end dependencies using package-lock.json cd client npm ci # build front-end npm run build # install back-end dependencies cd ../server npm ci cd .. # copy client build to server directory mkdir server/public cp -r client/build/* server/public
At this point you can run the SQLPad server with the front-end built for production use:
cd server node server.js --dir ../db --port 3010 --base-url '/sqlpad'
If prefered, SQLPad can be installed as a global module using the local files in this repo. This allows running SQLPad via the cli in any directory, just as if you had installed it with
npm install sqlpad -g. Note that you must build and copy the client prior to this step.
cd server node install -g # Now from somewhere else you can run sqlpad like cd ~ sqlpad --dir ../db --port 3010 --base-url '/sqlpad'
A docker image may be built using the Dockerfile located in
server directory. See
docker-publish.sh for example docker build command.