2024-06-04 15:28:54 +01:00
|
|
|
# Modified version of https://github.com/sosedoff/pgweb/blob/master/docker-compose.yml
|
2024-06-04 14:59:05 +01:00
|
|
|
services:
|
|
|
|
postgres:
|
|
|
|
container_name: postgres
|
|
|
|
image: postgres:latest
|
|
|
|
ports:
|
|
|
|
- 5433:5432
|
2024-06-04 15:19:12 +01:00
|
|
|
# Disabling persistence to allow for the program to be run multiple times
|
|
|
|
# volumes:
|
|
|
|
# - ./db-data:/var/lib/postgresql/data
|
2024-06-04 14:59:05 +01:00
|
|
|
# environment:
|
|
|
|
# POSTGRES_DB: "db"
|
|
|
|
# POSTGRES_PASSWORD: "dbpass"
|
|
|
|
# POSTGRES_USER: "dbuser"
|
|
|
|
env_file:
|
|
|
|
- .env
|
|
|
|
healthcheck:
|
2024-06-04 15:28:54 +01:00
|
|
|
test: pg_isready -U db -h 127.0.0.1
|
2024-06-04 14:59:05 +01:00
|
|
|
interval: 5s
|
2024-06-04 15:28:54 +01:00
|
|
|
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
|
|
|
|
|
2024-06-04 14:59:05 +01:00
|
|
|
# volumes:
|
|
|
|
# data:
|
|
|
|
# name: hello-postgres
|
|
|
|
|
2024-06-04 15:28:54 +01:00
|
|
|
networks:
|
|
|
|
db-net:
|
|
|
|
name: db-net
|