Skip to content

Postgresql Installation Using Docker

Panagiotis Kapsalis edited this page Feb 3, 2020 · 1 revision

Postgresql Installation using Docker

You must have installed in your OS the following modules:

  • docker
  • docker-compose

You must run the following docker-compose.yml script using the above command

docker-compose up -d
version: '3.7'

services:

  crawler_db:
    image: postgres:11
    hostname: CONTAINER_NAME
    container_name: CONTAINER_NAME
    restart: always
    ports:
      - 5432:5432
    volumes:
      - crawler_db:/var/lib/postgresql/data
    environment:
      - POSTGRES_USER=POSTGRES_USER
      - POSTGRES_PASSWORD=POSTGRES_PASSWORD
      - POSTGRES_DB=POSTGRES_DB
    networks:
      - qchain

networks:
  qchain:
    driver: bridge

volumes:
  crawler_db: