Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. create a new folder: database_postgres

  2. create a new text file inside the folder called: docker-compose.yml

  3. add this code snipped into the file …

Code Block
languageyaml
version: '3'

services:
  postgres:
    image: postgres:14.4
    restart: always
    ports:
      - 5432:5432
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=password
    volumes:
      - ./postgres-data:/var/lib/postgresql/data

...