Advertisement
Guest User

Untitled

a guest
Mar 25th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. # Stop any hanging services,
  2. # then run the task with docker-compose:
  3. #
  4. # > sudo service postgresql stop
  5. # > sudo docker-compose up -d
  6.  
  7. version: '3'
  8. services:
  9. db:
  10. restart: unless-stopped
  11. image: postgres:10
  12. volumes:
  13. - ./postgres-data:/var/lib/postgresql/data
  14. container_name: postgress
  15. ports:
  16. - 8088:8088
  17. environment:
  18. POSTGRES_DB: db_name
  19. POSTGRES_USER: postgres
  20. POSTGRES_PASSWORD: postgres
  21.  
  22. # To avoid postgress from executing on startup:
  23. #
  24. # > sudo systemctl disable postgresql.service
  25.  
  26. # To test out postgressSQL instance, first install:
  27. #
  28. # > sudo apt install postgresql-client-common
  29. # > sudo apt-get install postgresql-client
  30. #
  31. # Checkout the instance at:
  32. #
  33. # > psql -h localhost -d db_name -U postgres -p 8088
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement