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'
# 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
# Problems next major versions 10, 11 and 1 with Doctrine
# an exception occurred in driver: SQLSTATE[08006] [7] FATAL: unsupported frontend protocol 1234.5679: server supports 2.0 to 3.0
# SQLSTATE[42703]: Undefined column: 7 ERROR: column "min_value" does not exist
ports:
- "5434:5432"
volumes:
- ./sql:/docker-entrypoint-initdb.d/
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: root
POSTGRES_DB: my_db
More on Stackoverflow Random snippet
Call to action
Did you like this post? You can help me back in several ways: (use the "reply" link on the right to comment or to contact me )
- Report any error/typo.
- Report something that could be improved.
- Like and repost!
- Follow me on Bluesky 🦋
- Subscribe to the RSS feed.
- Click on the More on Stackoverflow buttons to make me win "Announcer" badges 🏅.
Thank you for reading! And see you soon on Strangebuzz! 😉
