Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Stop any hanging services,
- # then run the task with docker-compose:
- #
- # > sudo service postgresql stop
- # > sudo docker-compose up -d
- version: '3'
- services:
- db:
- restart: unless-stopped
- image: postgres:10
- volumes:
- - ./postgres-data:/var/lib/postgresql/data
- container_name: postgress
- ports:
- - 8088:8088
- environment:
- POSTGRES_DB: db_name
- POSTGRES_USER: postgres
- POSTGRES_PASSWORD: postgres
- # To avoid postgress from executing on startup:
- #
- # > sudo systemctl disable postgresql.service
- # To test out postgressSQL instance, first install:
- #
- # > sudo apt install postgresql-client-common
- # > sudo apt-get install postgresql-client
- #
- # Checkout the instance at:
- #
- # > psql -h localhost -d db_name -U postgres -p 8088
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement