Docker compose file for Postgres

Published on 2019-10-01 • Modified on 2019-10-01

This is the docker compose file I am using for postgreSQL 9.6. As this is an official image, there should't be any problem. Don't use root/root in production. 😉


version: '3.7'

# /usr/local/bin/docker-compose -f docker-compose.yaml up -d
services:
  # PostgreSQL database, this is an official image
  # https://hub.docker.com/_/postgres
  postgres:
    container_name: sb-postgres
    image: postgres:9.6
    ports:
      - "5434:5432"
    volumes:
      - ./sql:/docker-entrypoint-initdb.d/
    environment:
      POSTGRES_USER: root
      POSTGRES_PASSWORD: root
      POSTGRES_DB: my_db

 More on Stackoverflow


» Comments

Privacy-focused with Commento. (Comment system added on 2019-10-17: be the first! 🥇)