mirror of
https://github.com/sosedoff/pgweb.git
synced 2024-12-13 15:35:28 +03:00
46 lines
872 B
YAML
46 lines
872 B
YAML
---
|
|
version: "3.9"
|
|
|
|
services:
|
|
postgres:
|
|
container_name: pgweb-postgres
|
|
image: postgres:15
|
|
ports:
|
|
- 5433:5432
|
|
volumes:
|
|
- data:/var/lib/postgresql/data
|
|
environment:
|
|
POSTGRES_DB: pgweb
|
|
POSTGRES_PASSWORD: pgweb
|
|
POSTGRES_USER: pgweb
|
|
healthcheck:
|
|
test: pg_isready -U pgweb -h 127.0.0.1
|
|
interval: 5s
|
|
networks:
|
|
- pgweb
|
|
|
|
pgweb:
|
|
container_name: pgweb
|
|
image: sosedoff/pgweb:latest
|
|
build: .
|
|
environment:
|
|
PGWEB_DATABASE_URL: postgres://pgweb:pgweb@pgweb-postgres:5432/pgweb?sslmode=disable
|
|
ports:
|
|
- 8081:8081
|
|
networks:
|
|
- pgweb
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD", "nc", "-vz", "127.0.0.1", "8081"]
|
|
interval: 5s
|
|
|
|
volumes:
|
|
data:
|
|
name: pgweb_postgres
|
|
|
|
networks:
|
|
pgweb:
|
|
name: pgweb
|