Advertisement
Guest User

Untitled

a guest
Jan 25th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.01 KB | None | 0 0
  1. server {
  2. server_name symfony3.dev www.symfony3.dev;
  3. root /app/web;
  4.  
  5. location / {
  6. # try to serve file directly, fallback to app.php
  7. try_files $uri /app.php$is_args$args;
  8. }
  9. # DEV
  10. # This rule should only be placed on your development environment
  11. # In production, don't include this and don't deploy app_dev.php or config.php
  12. # location ~ ^/(app_dev|config)\.php(/|$) {
  13. # fastcgi_pass php:9000;
  14. # fastcgi_split_path_info ^(.+\.php)(/.*)$;
  15. # include fastcgi_params;
  16. # # When you are using symlinks to link the document root to the
  17. # # current version of your application, you should pass the real
  18. # # application path instead of the path to the symlink to PHP
  19. # # FPM.
  20. # # Otherwise, PHP's OPcache may not properly detect changes to
  21. # # your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126
  22. # # for more information).
  23. # fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
  24. # fastcgi_param DOCUMENT_ROOT $realpath_root;
  25. # }
  26. # PROD
  27. location ~ ^/app\.php(/|$) {
  28. fastcgi_pass php:9000;
  29. fastcgi_split_path_info ^(.+\.php)(/.*)$;
  30. include fastcgi_params;
  31. # When you are using symlinks to link the document root to the
  32. # current version of your application, you should pass the real
  33. # application path instead of the path to the symlink to PHP
  34. # FPM.
  35. # Otherwise, PHP's OPcache may not properly detect changes to
  36. # your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126
  37. # for more information).
  38. fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
  39. fastcgi_param DOCUMENT_ROOT $realpath_root;
  40. # Prevents URIs that include the front controller. This will 404:
  41. # http://symfony3.dev/app.php/some-path
  42. # Remove the internal directive to allow URIs like this
  43. internal;
  44. }
  45. }
  46.  
  47.  
  48. docker-compose.production.yml:
  49. version: '2'
  50.  
  51. services:
  52. # The Application
  53. php:
  54. image: cityhub:5000/symfony-deploy/app
  55. volumes:
  56. # - ./storage:/app/storage
  57. - /app
  58. # env_file: '.env.prod'
  59. environment:
  60. - "DB_HOST=database"
  61. - "REDIS_HOST=cache"
  62.  
  63. # The Web Server
  64. web:
  65. image: cityhub:5000/symfony-deploy/web
  66. # volumes_from:
  67. # - app
  68. # volumes:
  69. # - "${LE_DIR}:/etc/letsencrypt"
  70. ports:
  71. - 80:80
  72. # - 443:443
  73.  
  74.  
  75. # The Database
  76. database:
  77. image: mysql:5.6
  78. volumes:
  79. - ./dbdata:/var/lib/mysql
  80. - ./schema.sql:/docker-entrypoint-initdb.d/schema.sql
  81. environment:
  82. MYSQL_ROOT_PASSWORD: vdab
  83. MYSQL_DATABASE: symfony-deploy-test
  84. MYSQL_USER: user
  85. MYSQL_PASSWORD: userpass
  86. # environment_file: .env
  87.  
  88. # redis
  89. # cache:
  90. # image: redis:3.0-alpine
  91. #
  92. # volumes:
  93. # dbdata:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement