Advertisement
Guest User

Untitled

a guest
Feb 26th, 2019
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.73 KB | None | 0 0
  1. version: '3'
  2.  
  3. services:
  4. #web
  5. frontend:
  6. build:
  7. context: ./environment/nginx
  8. dockerfile: ./Dockerfile
  9. container_name: nginx_software
  10. restart: always
  11. ports:
  12. - 80:80
  13. volumes:
  14. - ./environment/nginx/nginx.conf:/etc/nginx/nginx.conf
  15. links:
  16. - php
  17. php:
  18. build:
  19. context: ./environment/php
  20. args:
  21. version: 7.3-fpm
  22. dockerfile: ./Dockerfile
  23. container_name: php_software
  24. restart: always
  25. ports:
  26. - 9000:9000
  27. volumes:
  28. - ./api:/var/www/software:cached
  29. links:
  30. - mysql
  31. mysql:
  32. build:
  33. context: ./environment/mysql
  34. args:
  35. version: 5.7
  36. dockerfile: ./Dockerfile
  37. container_name: mysql_software
  38. command: --default-authentication-plugin=mysql_native_password
  39. restart: always
  40. ports:
  41. - 3306:3306
  42. volumes:
  43. - ./environment/mysql/data:/var/lib/mysql
  44. environment:
  45. MYSQL_ROOT_PASSWORD: software
  46. MYSQL_DATABASE: software
  47. MYSQL_USER: software
  48. MYSQL_PASSWORD: software
  49.  
  50. user nginx;
  51. worker_processes 1;
  52.  
  53. error_log /var/log/nginx/error.log warn;
  54. pid /var/run/nginx.pid;
  55.  
  56. events {
  57.  
  58. }
  59.  
  60. http {
  61.  
  62. include /etc/nginx/mime.types;
  63.  
  64. server {
  65.  
  66. listen 80;
  67. listen [::]:80;
  68. server_name software.test;
  69. root /usr/share/nginx/html/software;
  70.  
  71. add_header X-Frame-Options "SAMEORIGIN";
  72. add_header X-XSS-Protection "1; mode=block";
  73. #add_header X-Content-Type-Options "nosniff";
  74.  
  75. index index.html;
  76.  
  77. location / {
  78. try_files $uri $uri/ =404;
  79. }
  80.  
  81. charset utf-8;
  82. }
  83.  
  84. server {
  85. listen 80;
  86. listen [::]:80;
  87. server_name api.software.test;
  88. root /var/www/software/public;
  89.  
  90. add_header X-Frame-Options "SAMEORIGIN";
  91. add_header X-XSS-Protection "1; mode=block";
  92. #add_header X-Content-Type-Options "nosniff";
  93.  
  94. index index.php;
  95.  
  96. charset utf-8;
  97.  
  98. location / {
  99. try_files $uri $uri/ /index.php?$query_string;
  100. }
  101.  
  102. error_page 404 /index.php;
  103.  
  104. location ~ .php$ {
  105.  
  106. include fastcgi_params;
  107. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  108. fastcgi_param PATH_INFO $fastcgi_path_info;
  109. fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
  110.  
  111. fastcgi_pass php:9000;
  112. fastcgi_index index.php;
  113. }
  114.  
  115. location ~ /.(?!well-known).* {
  116. deny all;
  117. }
  118. }
  119.  
  120. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement