hello-postgres/docker-compose.yml

26 lines
517 B
YAML

services:
postgres:
container_name: postgres
image: postgres:latest
ports:
- 5433:5432
volumes:
- ./db-data:/var/lib/postgresql/data
# environment:
# POSTGRES_DB: "db"
# POSTGRES_PASSWORD: "dbpass"
# POSTGRES_USER: "dbuser"
env_file:
- .env
healthcheck:
test: pg_isready -U hello-postgres -h 127.0.0.1
interval: 5s
# networks:
# - db-net
# volumes:
# data:
# name: hello-postgres
# networks:
# db-net:
# name: db-net