Sign inSign up

jjajjara/pgsql-webui-simple

By jjajjara

Updated 12 months ago

A lightweight web UI for PostgreSQL CRUD, easily configured with an .env file. Runs in Docker.

Image
Web servers
Databases & storage
1

1.3K

jjajjara/pgsql-webui-simple repository overview

PostgreSQL WebUI Simple

ex_screenshot

A simple, lightweight, and configuration-based web UI for performing CRUD (Create, Read, Update, Delete) operations on specified PostgreSQL tables. This tool is designed to run in a Docker container without any code modifications, making it ideal for air-gapped environments or quick database management tasks.

Features

  • Configuration via Environment Variables: No need to rebuild or change code. Just set your database connection and target tables in the .env file.
  • Full CRUD Functionality: An intuitive interface for viewing, creating, updating, and deleting records.
  • Single Docker Container: Runs as a self-contained Docker image, perfect for easy deployment.
  • No External Dependencies: Designed for air-gapped environments. It runs without any external network access after the initial Docker image is pulled.
  • Modern Dark UI: A clean and modern user interface for managing your data.

Quick Start with Docker Compose

Follow these steps to get the application running in minutes.

Prerequisites
1. Create Project Files

First, create a directory for your project and add the following two files.

docker-compose.yml:

services:
  pgsql-webui-simple:
    image: jjajjara/pgsql-webui-simple:latest
    container_name: pgsql-webui-simple
    restart: unless-stopped
    ports:
      - "3000:8000"
    env_file:
      - .env

.env:

# .env file content

# 1. DATABASE_URL
# Format: postgresql://[USERNAME]:[PASSWORD]@[DB_HOST]:[PORT]/[DB_NAME]
DATABASE_URL=postgresql://db_username:db_password@db_server:db_port/db_name

# 2. TABLES
# A comma-separated list of table names you want to manage.
TABLES=sample_data,test_db
2. Configure Your Database

Open the .env file and replace the placeholder values with your actual PostgreSQL database credentials and the list of tables you wish to manage.

Important: If your database is running on the same machine (your local PC), use host.docker.internal instead of localhost or 127.0.0.1 for the DB_HOST. For example: postgresql://user:[email protected]:5432/mydb.

3. Run the Application

Navigate to your project directory in the terminal and run the following command:

docker-compose up -d

The -d flag runs the container in detached mode (in the background).

4. Access the Web UI

Once the container is running, open your web browser and go to:

http://localhost:3000

You should now see the web interface, ready to manage the tables you specified.

Stopping the Application

To stop the container, run the following command in the same directory:

docker-compose down

ver 0.4 : first public release

ver 0.5 : add sorting feature & translate english

Tag summary

Content type

Image

Digest

sha256:15f2882cc

Size

61.3 MB

Last updated

12 months ago

docker pull jjajjara/pgsql-webui-simple