Guest User

Untitled

a guest
Jan 23rd, 2019
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 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. environment:
  17. - DEBUG=false
  18.  
  19. - DB_USER=
  20. - DB_PASS=
  21. - DB_NAME=
  22. - DB_TEMPLATE=
  23.  
  24. - DB_EXTENSION=
  25.  
  26. - REPLICATION_MODE=
  27. - REPLICATION_USER=
  28. - REPLICATION_PASS=
  29. - REPLICATION_SSLMODE=
  30.  
  31. "
  32. :wq - SAVE IT
  33.  
  34. 3) run container
  35. docker-compose up
  36.  
  37. creates pg service accessible from outer network by port 50000
  38. docker-compose down - destroy this service/continer
  39. docker-compose stop - stop container
  40. docker-compose start - start container. All data stored from previos start still exists!!
Add Comment
Please, Sign In to add comment