services:
  postgres:
    image: postgres:16-alpine
    container_name: postgres_db
    restart: always
    environment:
      POSTGRES_USER: test
      POSTGRES_PASSWORD: 12345
      POSTGRES_DB: test
    ports:
      - "5432:5432"
    volumes:
      - pgdata:/var/lib/postgresql/data
      # Optional: Uncomment the next line to seed scripts automatically on first run
      # - ./init.sql:/docker-entrypoint-initdb.d/init.sql

volumes:
  pgdata:
