version: '3.8' services: postgres: image: docker.io/postgres:18-alpine container_name: nestri_postgres environment: POSTGRES_USER: postgres # Matches: user: 'postgres' POSTGRES_PASSWORD: postgres # Matches: password: 'postgres' POSTGRES_DB: nestri # Matches: database: 'nestri' ports: - '5432:5432' # Matches: port: 5432 volumes: - nestri_data:/var/lib/postgresql volumes: nestri_data: # Keeps your data safe when container restarts