Advertisement
Guest User

docker-compose.yml (Postgres)

a guest
Jul 27th, 2017
524
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.98 KB | None | 0 0
  1. web:
  2. container_name: ubuwebpostgres
  3. image: fab/ubuntu-postgres
  4. hostname: web
  5. ports:
  6. - "80:80"
  7. - "8025:8025" # MailHog UI
  8. - "3306:3306" # To allow connection from the host, e.g.: with Sequel Pro (didn't manage to get it to work.)
  9. - "5432:5432" # Postgres, in hope of being able to use an OS X client to connect to it once I get it running
  10. volumes:
  11. # Mind the order. e.g.: logs before config, so as to catch errors on the host instead of the container.
  12.  
  13. # For my own convenience
  14. - /Users/fabien/LocalDevUbuntuPostgres/tmp-fab:/tmp-fab
  15.  
  16. # For supervisor
  17. - /Users/fabien/LocalDevUbuntuPostgres/logs/supervisor:/var/log/supervisor
  18.  
  19. # For Apache2 (includes PHP errors)
  20. - /Users/fabien/LocalDevUbuntuPostgres/logs/apache2:/var/log/apache2
  21. - ./config/apache2.conf:/etc/apache2/apache2.conf #TODO: test without it cause there's no such file!
  22. - /Users/fabien/Dropbox/DEV/Docker/containers/ubuntu/config/sites-available:/etc/apache2/sites-available
  23. - /Users/fabien/Dropbox/DEV/Docker/containers/ubuntu/config/sites-available:/etc/apache2/sites-enabled
  24. - /Users/fabien/Dropbox/DEV/vhosts:/var/www/html
  25.  
  26. # For Postgres
  27. #- /Users/fabien/LocalDevUbuntuPostgres/logs/postgresql:/var/log/postgresql
  28. - /Users/fabien/LocalDevUbuntuPostgres/postgresdata:/var/lib/postgresql/9.6/main # causes Postgres to keep crashing!
  29. - ./config/pg_hba.conf:/etc/postgresql/9.6/main/pg_hba.conf
  30.  
  31. # For MySQL (MariaDB) -- required to migrate data from MySQL to Postgres
  32. - /Users/fabien/LocalDevUbuntuPostgres/logs/mysql:/var/log/mysql
  33. - /Users/fabien/LocalDevUbuntuPostgres/mysqldata:/var/lib/mysql
  34.  
  35.  
  36. # RUN THIS CONTAINER:
  37. # cd /Users/fabien/Dropbox/DEV/Docker/containers/ubuntu-postgres
  38. # docker-compose up -d
  39. # STOP:
  40. # docker-compose down
  41. # RESTART:
  42. # docker-compose down; docker-compose up -d;
  43. # RESTART AND GET INTO BASH:
  44. # docker-compose down --remove-orphans; docker-compose up -d; docker exec -it ubuwebpostgres /bin/bash
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement