Guest User

Untitled

a guest
Feb 5th, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. version: '3.3'
  2.  
  3. services:
  4.  
  5. nginx:
  6. image: nginx:1.15.8-alpine
  7. container_name: nginx
  8. ports:
  9. - 8000:80
  10. volumes:
  11. - ./etc/nginx/default.conf:/etc/nginx/conf.d/default.conf
  12. - ./web:/var/www/html
  13. - ./etc/nginx/default.template.conf:/etc/nginx/conf.d/default.template
  14. - ./etc/logs/nginx:/var/log/nginx
  15. environment:
  16. - NGINX_HOST=${NGINX_HOST}
  17. links:
  18. - php
  19. - mysqldb
  20. restart: always
  21.  
  22. php:
  23. build:
  24. context: .
  25. dockerfile: ./etc/php/Dockerfile
  26. container_name: php
  27. volumes:
  28. - ./web:/var/www/html
  29. - ./etc/php/php.ini:/usr/local/etc/php/conf.d/php.ini
  30. links:
  31. - mysqldb
  32. restart: always
  33.  
  34. mysqldb:
  35. image: mysql:${MYSQL_VERSION}
  36. container_name: ${MYSQL_HOST}
  37. ports:
  38. - 8989:3306
  39. env_file:
  40. - web/.env
  41. environment:
  42. - MYSQL_DATABASE=${MYSQL_DATABASE}
  43. - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
  44. - MYSQL_USER=${MYSQL_USER}
  45. - MYSQL_PASSWORD=${MYSQL_PASSWORD}
  46. volumes:
  47. - ./etc/db/mysql:/var/lib/mysql
  48. restart: always
  49.  
  50. FROM php:7.2-fpm
  51.  
  52. WORKDIR '/var/www/html'
  53.  
  54. RUN apt-get update
  55. RUN apt-get install -y
  56. curl
  57. wget
  58. git
  59.  
  60. RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
  61. RUN docker-php-ext-install pdo_mysql
  62.  
  63. RUN echo "alias phinx='php src/vendor/bin/phinx'" >> ~/.bashrc
Add Comment
Please, Sign In to add comment