Advertisement
Guest User

Untitled

a guest
Apr 4th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. create folder
  2. 1)
  3. mkdir docker-compose-pg
  4. cd docker-compose-pg
  5.  
  6. 2)
  7. vi docker-compose.yml
  8.  
  9. insert this text:
  10. "
  11. postgredb:
  12. restart: always
  13. image: postgres:latest
  14. ports:
  15. - "5432:5432"
  16. - "localhost:50000:5432"
  17. environment:
  18. - DEBUG=false
  19.  
  20. - DB_USER=
  21. - DB_PASS=
  22. - DB_NAME=
  23. - DB_TEMPLATE=
  24.  
  25. - DB_EXTENSION=
  26.  
  27. - REPLICATION_MODE=
  28. - REPLICATION_USER=
  29. - REPLICATION_PASS=
  30. - REPLICATION_SSLMODE=
  31.  
  32. "
  33. :wq - SAVE IT
  34.  
  35. 3) run container
  36. docker-compose up
  37.  
  38. creates pg service accessible from outer network by port 50000
  39. docker-compose down - destroy this service/continer
  40. docker-compose stop - stop container
  41. docker-compose start - start container. All data stored from previos start still exists!!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement