Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: '3.5'
- # docker with pgadmin/postgres/nodejs
- # endable docker to start with OS
- # - sudo systemctl enable docker
- # to run:
- # sudo docker-compose up -d
- # remove the -d to get messages from docker, do not run in vscode
- # todo add redis memory db for users etc
- services:
- postgres:
- container_name: postgres_container
- image: postgres:11.1
- environment:
- POSTGRES_USER: ${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
- POSTGRES_DB: ${POSTGRES_DB:-postgres}
- PGDATA: /data/postgres
- volumes:
- - ./postgres:/data/postgres
- ports:
- - "${POSTGRES_PORT:-5432}:5432"
- expose:
- - "5432"
- networks:
- - ${POSTGRES_HOST:-postgres}
- restart: always
- pgadmin:
- container_name: pgadmin_container
- image: dpage/pgadmin4
- environment:
- PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-postgres@postgres.org}
- PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-postgres}
- volumes:
- - ./pgadmin:/var/lib/pgadmin/storage
- ports:
- - "${PGADMIN_PORT:-5050}:80"
- networks:
- - postgres
- restart: always
- networks:
- postgres:
- driver: bridge
- volumes:
- postgres:
- pgadmin:
Add Comment
Please, Sign In to add comment