full-stack-professional icon indicating copy to clipboard operation
full-stack-professional copied to clipboard

POSTGRES_DB: customer in compose.yml

Open hazartilirot opened this issue 2 years ago • 0 comments

Basically, if you open the official docker postgres page there would be the subject's description. You just need to add this line to your compose.yml file in order to create the default database customer POSTGRES_DB: customer

version: "3.9"

services:
  db:
    container_name: postgres
    image: postgres:latest
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: root
      POSTGRES_DB: customer
      PGDATA: /data/postgres
    volumes:
      - db:/data/postgres
    ports:
      - 5432:5432
    networks:
      - db
    restart: unless-stopped

networks:
  db:
    driver: bridge
volumes:
  db:

hazartilirot avatar Apr 28 '23 18:04 hazartilirot