Extranet : Project structure

This commit is contained in:
Michael RICOIS 2017-03-07 14:52:26 +01:00
parent f3d8dcaefe
commit 915b948b5b
8 changed files with 46 additions and 45 deletions

View File

@ -6,7 +6,7 @@ phpSettings.soap.wsdl_cache_dir = "PROJECT_DIR/shared/temp/wsdl"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "Application"
resources.session.save_path = "PROJECT_DIR/shared/temp/sessions"
resources.session.save_path = "PROJECT_DIR/shared/sessions"
resources.useragent.mobile.features.path = APPLICATION_PATH "/../library/Zend/Http/UserAgent/Features/Adapter/Browscap.php"
resources.useragent.mobile.features.classname = "Zend_Http_UserAgent_Features_Adapter_Browscap"
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"

View File

@ -6,7 +6,7 @@ phpSettings.soap.wsdl_cache_dir = "PROJECT_DIR/shared/temp/wsdl"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "Application"
resources.session.save_path = "PROJECT_DIR/shared/temp/sessions"
resources.session.save_path = "PROJECT_DIR/shared/sessions"
resources.useragent.mobile.features.path = APPLICATION_PATH "/../library/Zend/Http/UserAgent/Features/Adapter/Browscap.php"
resources.useragent.mobile.features.classname = "Zend_Http_UserAgent_Features_Adapter_Browscap"
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"

View File

@ -2,11 +2,11 @@
phpSettings.date.timezone = "Europe/Paris"
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
phpSettings.soap.wsdl_cache_dir = "PROJECT_DIR/shared/temp/wsdl"
phpSettings.soap.wsdl_cache_dir = "PROJECT_DIR/shared/wsdl"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "Application"
resources.session.save_path = "PROJECT_DIR/shared/temp/sessions"
resources.session.save_path = "PROJECT_DIR/shared/sessions"
resources.useragent.mobile.features.path = APPLICATION_PATH "/../library/Zend/Http/UserAgent/Features/Adapter/Browscap.php"
resources.useragent.mobile.features.classname = "Zend_Http_UserAgent_Features_Adapter_Browscap"
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"

View File

@ -2,11 +2,11 @@
phpSettings.date.timezone = "Europe/Paris"
phpSettings.display_startup_errors = 0
phpSettings.display_errors = 0
phpSettings.soap.wsdl_cache_dir = "PROJECT_DIR/shared/temp/wsdl"
phpSettings.soap.wsdl_cache_dir = "PROJECT_DIR/shared/wsdl"
bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
appnamespace = "Application"
resources.session.save_path = "PROJECT_DIR/shared/temp/sessions"
resources.session.save_path = "PROJECT_DIR/shared/sessions"
resources.useragent.mobile.features.path = APPLICATION_PATH "/../library/Zend/Http/UserAgent/Features/Adapter/Browscap.php"
resources.useragent.mobile.features.classname = "Zend_Http_UserAgent_Features_Adapter_Browscap"
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"

View File

@ -25,7 +25,7 @@
#ansistrano_git_branch: master
#ansistrano_git_identity_key_path: ""
# Hooks: custom tasks if you need them
#ansistrano_before_setup_tasks_file: "{{playbook_dir}}/<your-deployment-config>/my-before-setup-tasks.yml"
ansistrano_before_setup_tasks_file: "{{playbook_dir}}/tasks/before-setup.yml"
ansistrano_after_setup_tasks_file: "{{playbook_dir}}/tasks/after-setup.yml"
ansistrano_before_update_code_tasks_file: "{{playbook_dir}}/tasks/before-updatecode.yml"
ansistrano_after_update_code_tasks_file: "{{playbook_dir}}/tasks/after-updatecode.yml"

View File

@ -1,4 +1,10 @@
- name: EXTRANET | Restart PHP-FPM
become: yes
command: "service php5-fpm restart"
when: opcache is defined and opcache == "fcgi"
when: opcache is defined and opcache == "fcgi"
- name: EXTRANET | Cleanup
become: yes
file: path="{{ansistrano_shared_path}}/{{item.src}}" state=absent
with_items:
- { src: 'wsdl' }

View File

@ -15,34 +15,6 @@
become: yes
copy: src="./config/.user.{{project_env}}.ini" dest="{{ansistrano_release_path.stdout}}/public/.user.ini"
- name: EXTRANET | Cleanup
become: yes
file: path="{{ansistrano_shared_path}}/temp/{{item.src}}" state=absent
with_items:
- { src: 'wsdl' }
- name: EXTRANET | Create Temp Dir
become: yes
file: path="{{ansistrano_shared_path}}/temp/{{item.src}}" state=directory owner=www-data group=www-data
with_items:
- { src: 'cache' }
- { src: 'files' }
- { src: 'sessions' }
- { src: 'wsdl' }
- { src: 'pages/file/image/logo' }
- { src: 'pages/file/image/cache' }
- { src: 'pages/file/streetview/img' }
- { src: 'pages/imgcache' }
- name: EXTRANET | Create Symlink
become: yes
file: src={{item.src}} dest={{item.dest}} state=link force=yes
with_items:
- { src: "{{ansistrano_shared_path}}/persist/logos", dest: "{{ansistrano_shared_path}}/temp/pages/file/image/logo/q" }
- { src: "{{ansistrano_shared_path}}/temp/pages/imgcache", dest: "{{ansistrano_shared_path}}/temp/pages/file/image/cache/q" }
- { src: "{{ansistrano_shared_path}}/persist/streetview", dest: "{{ansistrano_shared_path}}/temp/pages/file/streetview/img/q" }
- { src: "{{ansistrano_release_path.stdout}}/public/themes", dest: "{{ansistrano_shared_path}}/temp/pages/themes" }
- name: EXTRANET | Set Permission "ansistrano_release_path"
become: yes
file: path="{{ansistrano_release_path.stdout}}" state=directory recurse=yes mode="u=rwx,g=rwx,o=rx" owner=www-data group=www-data

View File

@ -1,19 +1,42 @@
---
- name: CRONY | Project directory
- name: EXTRANET | Project directory
file: path="{{ansistrano_deploy_to}}" state=directory
- name: CRONY | Project releases directory
- name: EXTRANET | Project releases directory
file: path="{{ansistrano_deploy_to}}/releases" state=directory
- name: CRONY | Project shared directories
file: path="{{ansistrano_deploy_to}}/shared/{{item.src}}" state=directory recurse=yes
with_items:
- { src: 'log' }
- name: EXTRANET | Project shared directory
file: path="{{ansistrano_deploy_to}}/shared" state=directory
- stat:
path: "{{ansistrano_deploy_to}}/shared/sources"
path: "{{ansistrano_deploy_to}}/shared/persist"
register: st
- fail:
msg: "Symlink manquant {{ansistrano_deploy_to}}/shared/sources"
msg: "Symlink manquant {{ansistrano_deploy_to}}/shared/persist"
when: (project_env != "dev") and (st.stat.islnk is not defined or st.stat.islnk == False)
- name: EXTRANET | Project shared directories
become: yes
file: path="{{ansistrano_shared_path}}/{{item.src}}" state=directory owner=www-data group=www-data
with_items:
- { src: 'log' }
- { src: 'cache' }
- { src: 'files' }
- { src: 'pages' }
- { src: 'pages/file/image/logo' }
- { src: 'pages/file/image/cache' }
- { src: 'pages/file/streetview/img' }
- { src: 'pages/imgcache' }
- { src: 'sessions' }
- { src: 'wsdl' }
- name: EXTRANET | Create Symlink
become: yes
file: src={{item.src}} dest={{item.dest}} state=link force=yes
with_items:
- { src: "{{ansistrano_shared_path}}/persist/logos", dest: "{{ansistrano_shared_path}}/pages/file/image/logo/q" }
- { src: "{{ansistrano_shared_path}}/pages/imgcache", dest: "{{ansistrano_shared_path}}pages/file/image/cache/q" }
- { src: "{{ansistrano_shared_path}}/persist/streetview", dest: "{{ansistrano_shared_path}}/pages/file/streetview/img/q" }
- { src: "{{ansistrano_release_path.stdout}}/public/themes", dest: "{{ansistrano_shared_path}}/pages/themes" }