Use `pgweb` to allow changes to be seen in a GUI
This commit is contained in:
parent
ddf87eec2a
commit
828cb51141
|
@ -2,4 +2,5 @@ POSTGRES_DB = db
|
||||||
DB_HOST = localhost
|
DB_HOST = localhost
|
||||||
DB_PORT = 5433
|
DB_PORT = 5433
|
||||||
POSTGRES_USER = dbusername
|
POSTGRES_USER = dbusername
|
||||||
POSTGRES_PASSWORD = dbpassword
|
POSTGRES_PASSWORD = dbpassword
|
||||||
|
PGWEB_DATABASE_URL = postgres://dbusername:dbpassword@postgres:5432/db?sslmode=disable
|
|
@ -1,3 +1,4 @@
|
||||||
|
# Modified version of https://github.com/sosedoff/pgweb/blob/master/docker-compose.yml
|
||||||
services:
|
services:
|
||||||
postgres:
|
postgres:
|
||||||
container_name: postgres
|
container_name: postgres
|
||||||
|
@ -14,14 +15,30 @@ services:
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: pg_isready -U hello-postgres -h 127.0.0.1
|
test: pg_isready -U db -h 127.0.0.1
|
||||||
interval: 5s
|
interval: 5s
|
||||||
# networks:
|
networks:
|
||||||
# - db-net
|
- 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:
|
# volumes:
|
||||||
# data:
|
# data:
|
||||||
# name: hello-postgres
|
# name: hello-postgres
|
||||||
|
|
||||||
# networks:
|
networks:
|
||||||
# db-net:
|
db-net:
|
||||||
# name: db-net
|
name: db-net
|
Loading…
Reference in New Issue