Guest User

Untitled

a guest
Mar 21st, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.03 KB | None | 0 0
  1. FROM nginx:latest
  2.  
  3. COPY ./nginx /etc/nginx
  4. COPY ./app /var/www/html
  5.  
  6. version: '3'
  7. services:
  8. mysql-db:
  9. image: mysql
  10. ports:
  11. - "3306:3306"
  12. environment:
  13. MYSQL_ROOT_PASSWORD: root
  14. MYSQL_DATABASE: symfony
  15. MYSQL_USER: symfony
  16. MYSQL_PASSWORD: symfony
  17.  
  18. app:
  19. image: simple-app
  20. ports:
  21. - "8888:80"
  22. volumes:
  23. - ./nginx:/etc/nginx
  24. - ./app:/var/www/html
  25. links:
  26. - php
  27.  
  28. php:
  29. image: php:7.1-fpm
  30.  
  31. server {
  32. listen 80 default_server;
  33. listen [::]:80 default_server;
  34.  
  35. root /var/www/html;
  36.  
  37. index index.php index.html index.htm;
  38.  
  39. server_name _;
  40.  
  41. location ~ .php$ {
  42. include snippets/fastcgi-php.conf;
  43. }
  44. }
  45.  
  46. fastcgi_split_path_info ^(.+.php)(/.+)$;
  47. try_files $uri =404;
  48. set $path_info $fastcgi_path_info;
  49. fastcgi_param PATH_INFO $path_info;
  50. fastcgi_pass php:9000;
  51. fastcgi_index index.php;
  52. include fastcgi.conf;
  53.  
  54. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  55. fastcgi_param QUERY_STRING $query_string;
  56. fastcgi_param REQUEST_METHOD $request_method;
  57. fastcgi_param CONTENT_TYPE $content_type;
  58. fastcgi_param CONTENT_LENGTH $content_length;
  59.  
  60. fastcgi_param SCRIPT_NAME $fastcgi_script_name;
  61. fastcgi_param REQUEST_URI $request_uri;
  62. fastcgi_param DOCUMENT_URI $document_uri;
  63. fastcgi_param DOCUMENT_ROOT $document_root;
  64. fastcgi_param SERVER_PROTOCOL $server_protocol;
  65. fastcgi_param REQUEST_SCHEME $scheme;
  66. fastcgi_param HTTPS $https if_not_empty;
  67.  
  68. fastcgi_param GATEWAY_INTERFACE CGI/1.1;
  69. fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
  70.  
  71. fastcgi_param REMOTE_ADDR $remote_addr;
  72. fastcgi_param REMOTE_PORT $remote_port;
  73. fastcgi_param SERVER_ADDR $server_addr;
  74. fastcgi_param SERVER_PORT $server_port;
  75. fastcgi_param SERVER_NAME $server_name;
  76.  
  77. # PHP only, required if PHP was built with --enable-force-cgi-redirect
  78. fastcgi_param REDIRECT_STATUS 200;
  79.  
  80. ...
  81.  
  82. php:
  83. image:php:7.1-fpm
  84. volumes:./app:/var/www/html
Add Comment
Please, Sign In to add comment