Use `pgweb` to allow changes to be seen in a GUI

This commit is contained in:
slashtechno 2024-06-04 09:28:54 -05:00
parent ddf87eec2a
commit 828cb51141
Signed by: slashtechno
GPG Key ID: 8EC1D9D9286C2B17
2 changed files with 25 additions and 7 deletions

View File

@ -3,3 +3,4 @@ DB_HOST = localhost
DB_PORT = 5433
POSTGRES_USER = dbusername
POSTGRES_PASSWORD = dbpassword
PGWEB_DATABASE_URL = postgres://dbusername:dbpassword@postgres:5432/db?sslmode=disable

View File

@ -1,3 +1,4 @@
# Modified version of https://github.com/sosedoff/pgweb/blob/master/docker-compose.yml
services:
postgres:
container_name: postgres
@ -14,14 +15,30 @@ services:
env_file:
- .env
healthcheck:
test: pg_isready -U hello-postgres -h 127.0.0.1
test: pg_isready -U db -h 127.0.0.1
interval: 5s
# networks:
# - db-net
networks:
- db-net
pgweb:
container_name: pgweb
image: sosedoff/pgweb
ports:
- 8081:8081
env_file:
- .env
networks:
- db-net
depends_on:
postgres:
condition: service_healthy
healthcheck:
test: ["CMD", "nc", "-vz", "127.0.0.1", "8081"]
interval: 5s
# volumes:
# data:
# name: hello-postgres
# networks:
# db-net:
# name: db-net
networks:
db-net:
name: db-net