Created
March 12, 2019 17:37
-
-
Save victorjtfranco/7aef0d5cc260367eb3f83e04fb3472cc to your computer and use it in GitHub Desktop.
Docker-compose Postgres setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See | |
# https://github.com/khezen/compose-postgres/blob/master/README.md | |
# https://info.crunchydata.com/blog/easy-postgresql-10-and-pgadmin-4-setup-with-docker | |
# https://hub.docker.com/_/postgres | |
version: '3.5' | |
services: | |
postgres: | |
image: postgres:10.7 | |
environment: | |
POSTGRES_USER: ${POSTGRES_USER:-postgres} | |
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-changeme} | |
PGDATA: /data/postgres | |
volumes: | |
- postgres:/data/postgres | |
ports: | |
- "5432:5432" | |
networks: | |
- postgres | |
restart: unless-stopped | |
pgadmin: | |
image: crunchydata/crunchy-pgadmin4:centos7-10.5-2.1.0 | |
environment: | |
PGADMIN_SETUP_EMAIL: ${PGADMIN_SETUP_EMAIL:[email protected]} | |
PGADMIN_SETUP_PASSWORD: ${PGADMIN_SETUP_PASSWORD:-admin} | |
SERVER_PORT: "5050" | |
volumes: | |
- pgadmin:/root/.pgadmin | |
ports: | |
- "${PGADMIN_PORT:-5050}:5050" | |
networks: | |
- postgres | |
restart: unless-stopped | |
networks: | |
postgres: | |
driver: bridge | |
volumes: | |
postgres: | |
pgadmin: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment