manala / manalize

Provides ready-to-use environments for various projects through manala ansible roles
http://www.manala.io
MIT License
36 stars 2 forks source link

Symfony flex support #138

Closed nervo closed 6 years ago

nervo commented 6 years ago
tristanbes commented 6 years ago

do want this ! 🤓 😍

tristanbes commented 6 years ago

Maybe I'm wrong, but why drop /var/sessions when it's still the default path used to store sessions ?

https://symfony.com/doc/current/session/sessions_directory.html

ogizanagi commented 6 years ago

@tristanbes : Right, but starting to symfony 3.4 with flex, the default is to use the native session handler (php.ini declared one), so this is not needed by default.

tristanbes commented 6 years ago

ok, my bad, the doc didn't reflect that.

tristanbes commented 6 years ago

For other reading this issue, you can get an app based on Flex work out of the box with

// app.yml
  nginx_configs:
    - file:     app_php_fpm
      template: configs/app_php_fpm.{{ env }}.j2
    - file:     app_gzip
      template: configs/app_gzip.{{ env }}.j2
    # App
    - file: app.conf
      config:
        - server:
          - server_name: "{{ app.host }}"
          - root:        "{{ app.dir }}{{ app.dir_release }}/public"
          - access_log:  "{{ app.log_dir }}/nginx.access.log"
          - error_log:   "{{ app.log_dir }}/nginx.error.log"
          - include:     conf.d/app_gzip
          - location /:
            - try_files: $uri /index.php$is_args$args
          - location ~ ^/index\.php(/|$):
            - include: conf.d/app_php_fpm
nervo commented 6 years ago

@tristanbes just mising the location internal directive as seen on https://symfony.com/doc/current/setup/web_server_configuration.html#nginx

Note that it can now be enabled even in development environment.