hello-postgres/docker-compose.yml

27 lines
599 B
YAML
Raw Normal View History

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
# 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