mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 15:03:25 +00:00
Merge pull request #2372 from xrousset78800/PHRAS-1723/vagrant-deploy-fix-paths-and-varnames
PHRAS-1723 Fix some paths, variable namings
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
---
|
||||
# Application tasks to be customized and to run after the main provision
|
||||
#Application tasks to be customized and to run after the main provision
|
||||
- name: Install global npm packages
|
||||
become: yes
|
||||
become_user: vagrant
|
||||
@@ -32,7 +32,7 @@
|
||||
- name: Run application setup
|
||||
become: yes
|
||||
become_user: vagrant
|
||||
shell: 'bin/setup system:install --email=admin@{{ hostname }}.vb --password=admin --db-host=127.0.0.1 --db-port=3306 --db-user={{ mariadb.user }} --db-password={{ mariadb.password }} --db-template=fr --appbox={{ mariadb.database }} --databox={{ mariadb.databox_db }} --server-name=www.{{ hostname }}.vb --data-path=/vagrant/datas -y'
|
||||
shell: 'bin/setup system:install --email=admin@{{ hostname }}.vb --password=admin --db-host=127.0.0.1 --db-port=3306 --db-user={{ mariadb.user }} --db-password={{ mariadb.password }} --db-template=fr --appbox={{ mariadb.appbox_db }} --databox={{ mariadb.databox_db }} --server-name=www.{{ hostname }}.vb --data-path=/vagrant/datas -y'
|
||||
args:
|
||||
chdir: /vagrant/
|
||||
|
||||
|
@@ -42,9 +42,9 @@
|
||||
- name: mariadb | Create databases
|
||||
mysql_db: name={{ item }} state=present login_user=root login_password={{ mariadb.root_password }}
|
||||
with_items:
|
||||
- "{{ mariadb.appbox_db }}"
|
||||
- "{{ mariadb.databox_db }}"
|
||||
- "{{ mariadb.alt_databox_db }}"
|
||||
- "{{ mariadb.appbox_db }}"
|
||||
- "{{ mariadb.databox_db }}"
|
||||
- "{{ mariadb.alt_databox_db }}"
|
||||
|
||||
- name: mariadb | Import dump
|
||||
mysql_db: name={{ mariadb.database }} state=import login_user=root login_password={{ mariadb.root_password }} target=/vagrant/{{ mariadb.dump }}
|
||||
|
@@ -25,7 +25,7 @@ server {
|
||||
location ~ ^/(index|index_dev|api|api_dev)\.php(/|$) {
|
||||
root {{ nginx.docroot }}/www;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass unix:/var/run/php5-fpm.sock;
|
||||
fastcgi_pass unix:/var/run/php/php5.6-fpm.sock;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH /usr/local/bin:/usr/bin:/bin;
|
||||
@@ -63,7 +63,7 @@ server {
|
||||
location ~ ^/(index|index_dev|api)\.php(/|$) {
|
||||
root {{ nginx.docroot }}/www;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass unix:/var/run/php5-fpm.sock;
|
||||
fastcgi_pass unix:/var/run/php/php5.6-fpm.sock;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH /usr/local/bin:/usr/bin:/bin;
|
||||
|
@@ -1,3 +1,3 @@
|
||||
---
|
||||
- name: restart php5-fpm
|
||||
service: name=php5-fpm enabled=yes state=restarted
|
||||
- name: restart php5.6-fpm
|
||||
service: name=php5.6-fpm enabled=yes state=restarted
|
||||
|
@@ -1,11 +1,11 @@
|
||||
---
|
||||
- stat: path=/etc/php5/apache2/php.ini
|
||||
- stat: path=/etc/php/5.6/apache2/php.ini
|
||||
register: modphp
|
||||
|
||||
- stat: path=/etc/php5/fpm/php.ini
|
||||
- stat: path=/etc/php/5.6/fpm/php.ini
|
||||
register: phpfpm
|
||||
|
||||
- stat: path=/etc/php5/cli/php.ini
|
||||
- stat: path=/etc/php/5.6/cli/php.ini
|
||||
register: phpcli
|
||||
|
||||
- include: php-fpm.yml
|
||||
|
@@ -7,9 +7,9 @@
|
||||
sudo: yes
|
||||
apt: pkg=php5 state=latest
|
||||
|
||||
- name: Install php5-fpm
|
||||
- name: Install php5.6-fpm
|
||||
sudo: yes
|
||||
apt: pkg=php5-fpm state=latest
|
||||
apt: pkg=php5.6-fpm state=latest
|
||||
|
||||
- name: Install PHP Packages
|
||||
sudo: yes
|
||||
|
@@ -1,30 +1,30 @@
|
||||
---
|
||||
- name: ensure timezone is set in apache2 php.ini
|
||||
lineinfile: dest=/etc/php5/apache2/php.ini
|
||||
lineinfile: dest=/etc/php/5.6/apache2/php.ini
|
||||
regexp='date.timezone ='
|
||||
line='date.timezone = {{ server.timezone }}'
|
||||
|
||||
- name: enabling opcache
|
||||
lineinfile: dest=/etc/php5/apache2/php.ini
|
||||
lineinfile: dest=/etc/php/5.6/apache2/php.ini
|
||||
regexp=';?opcache.enable=\d'
|
||||
line='opcache.enable=1'
|
||||
|
||||
- name: Disable PHP cache limiter
|
||||
lineinfile: dest=/etc/php5/apache2/php.ini
|
||||
lineinfile: dest=/etc/php/5.6/apache2/php.ini
|
||||
regexp=';?\s*session.cache_limiter\s*=\s*'
|
||||
line='session.cache_limiter = ""'
|
||||
|
||||
- name: set post_max_size
|
||||
lineinfile: dest=/etc/php5/apache2/php.ini
|
||||
lineinfile: dest=/etc/php/5.6/apache2/php.ini
|
||||
regexp=';?post_max_size\s*=\s*'
|
||||
line='post_max_size = 2G'
|
||||
|
||||
- name: set upload_max_filesize
|
||||
lineinfile: dest=/etc/php5/apache2/php.ini
|
||||
lineinfile: dest=/etc/php/5.6/apache2/php.ini
|
||||
regexp=';?upload_max_filesize\s*=\s*'
|
||||
line='upload_max_filesize = 2G'
|
||||
|
||||
- name: set max_input_vars
|
||||
lineinfile: dest=/etc/php5/apache2/php.ini
|
||||
lineinfile: dest=/etc/php/5.6/apache2/php.ini
|
||||
regexp=';?max_input_vars\s*=\s*'
|
||||
line='max_input_vars = 12000'
|
||||
|
@@ -1,5 +1,5 @@
|
||||
- name: Install
|
||||
apt: pkg="php5-dev" state=present
|
||||
apt: pkg="php5.6-dev" state=present
|
||||
when: php.pecl_packages is defined
|
||||
|
||||
- name: Install Package
|
||||
@@ -13,7 +13,7 @@
|
||||
- name: Create extension .ini file
|
||||
template: >
|
||||
src="extension.tpl"
|
||||
dest="/etc/php5/mods-available/{{ item.name }}.ini"
|
||||
dest="/etc/php/5.6/mods-available/{{ item.name }}.ini"
|
||||
owner="root"
|
||||
group="root"
|
||||
mode=0644
|
||||
|
@@ -1,30 +1,30 @@
|
||||
---
|
||||
- name: ensure timezone is set in cli php.ini
|
||||
lineinfile: dest=/etc/php5/cli/php.ini
|
||||
lineinfile: dest=/etc/php/5.6/cli/php.ini
|
||||
regexp='date.timezone ='
|
||||
line='date.timezone = {{ server.timezone }}'
|
||||
|
||||
- name: enabling opcache cli
|
||||
lineinfile: dest=/etc/php5/cli/php.ini
|
||||
lineinfile: dest=/etc/php/5.6/cli/php.ini
|
||||
regexp=';?opcache.enable_cli=\d'
|
||||
line='opcache.enable_cli=1'
|
||||
|
||||
- name: Disable PHP cache limiter
|
||||
lineinfile: dest=/etc/php5/cli/php.ini
|
||||
lineinfile: dest=/etc/php/5.6/cli/php.ini
|
||||
regexp=';?\s*session.cache_limiter\s*=\s*'
|
||||
line='session.cache_limiter = ""'
|
||||
|
||||
- name: set post_max_size
|
||||
lineinfile: dest=/etc/php5/cli/php.ini
|
||||
lineinfile: dest=/etc/php/5.6/cli/php.ini
|
||||
regexp=';?post_max_size\s*=\s*'
|
||||
line='post_max_size = 2G'
|
||||
|
||||
- name: set upload_max_filesize
|
||||
lineinfile: dest=/etc/php5/cli/php.ini
|
||||
lineinfile: dest=/etc/php/5.6/cli/php.ini
|
||||
regexp=';?upload_max_filesize\s*=\s*'
|
||||
line='upload_max_filesize = 2G'
|
||||
|
||||
- name: set max_input_vars
|
||||
lineinfile: dest=/etc/php5/cli/php.ini
|
||||
lineinfile: dest=/etc/php/5.6/cli/php.ini
|
||||
regexp=';?max_input_vars\s*=\s*'
|
||||
line='max_input_vars = 12000'
|
||||
|
@@ -1,48 +1,48 @@
|
||||
---
|
||||
- name: Set permissions on socket - owner
|
||||
lineinfile: "dest=/etc/php5/fpm/pool.d/www.conf state=present regexp='^;?listen.owner' line='listen.owner = www-data'"
|
||||
notify: restart php5-fpm
|
||||
lineinfile: "dest=/etc/php/5.6/fpm/pool.d/www.conf state=present regexp='^;?listen.owner' line='listen.owner = www-data'"
|
||||
notify: restart php5.6-fpm
|
||||
|
||||
- name: Set permissions on socket - group
|
||||
lineinfile: "dest=/etc/php5/fpm/pool.d/www.conf state=present regexp='^;?listen.group' line='listen.group = www-data'"
|
||||
notify: restart php5-fpm
|
||||
lineinfile: "dest=/etc/php/5.6/fpm/pool.d/www.conf state=present regexp='^;?listen.group' line='listen.group = www-data'"
|
||||
notify: restart php5.6-fpm
|
||||
|
||||
- name: Set permissions on socket - mode
|
||||
lineinfile: "dest=/etc/php5/fpm/pool.d/www.conf state=present regexp='^;?listen.mode' line='listen.mode = 0660'"
|
||||
notify: restart php5-fpm
|
||||
lineinfile: "dest=/etc/php/5.6/fpm/pool.d/www.conf state=present regexp='^;?listen.mode' line='listen.mode = 0660'"
|
||||
notify: restart php5.6-fpm
|
||||
|
||||
- name: ensure timezone is set in fpm php.ini
|
||||
lineinfile: dest=/etc/php5/fpm/php.ini
|
||||
lineinfile: dest=/etc/php/5.6/fpm/php.ini
|
||||
regexp='date.timezone ='
|
||||
line='date.timezone = {{ server.timezone }}'
|
||||
notify: restart php5-fpm
|
||||
notify: restart php5.6-fpm
|
||||
|
||||
- name: enabling opcache
|
||||
lineinfile: dest=/etc/php5/fpm/php.ini
|
||||
lineinfile: dest=/etc/php/5.6/fpm/php.ini
|
||||
regexp=';?opcache.enable=\d'
|
||||
line='opcache.enable=1'
|
||||
notify: restart php5-fpm
|
||||
notify: restart php5.6-fpm
|
||||
|
||||
- name: Disable PHP cache limiter
|
||||
lineinfile: dest=/etc/php5/fpm/php.ini
|
||||
lineinfile: dest=/etc/php/5.6/fpm/php.ini
|
||||
regexp=';?\s*session.cache_limiter\s*=\s*'
|
||||
line='session.cache_limiter = ""'
|
||||
notify: restart php5-fpm
|
||||
notify: restart php5.6-fpm
|
||||
|
||||
- name: set post_max_size
|
||||
lineinfile: dest=/etc/php5/fpm/php.ini
|
||||
lineinfile: dest=/etc/php/5.6/fpm/php.ini
|
||||
regexp=';?post_max_size\s*=\s*'
|
||||
line='post_max_size = 2G'
|
||||
notify: restart php5-fpm
|
||||
notify: restart php5.6-fpm
|
||||
|
||||
- name: set upload_max_filesize
|
||||
lineinfile: dest=/etc/php5/fpm/php.ini
|
||||
lineinfile: dest=/etc/php/5.6/fpm/php.ini
|
||||
regexp=';?upload_max_filesize\s*=\s*'
|
||||
line='upload_max_filesize = 2G'
|
||||
notify: restart php5-fpm
|
||||
notify: restart php5.6-fpm
|
||||
|
||||
- name: set max_input_vars
|
||||
lineinfile: dest=/etc/php5/fpm/php.ini
|
||||
lineinfile: dest=/etc/php/5.6/fpm/php.ini
|
||||
regexp=';?max_input_vars\s*=\s*'
|
||||
line='max_input_vars = 12000'
|
||||
notify: restart php5-fpm
|
||||
notify: restart php5.6-fpm
|
||||
|
@@ -43,7 +43,7 @@ mariadb:
|
||||
root_password: toor
|
||||
database: ab_master
|
||||
databox_db: db_master
|
||||
alt_db: db_alt
|
||||
alt_databox_db: db_alt
|
||||
user: phraseanet
|
||||
password: phraseanet
|
||||
dump: ''
|
||||
@@ -55,8 +55,26 @@ elasticsearch:
|
||||
- {name: 'elasticsearch/elasticsearch-analysis-icu', version: '2.7.0'}
|
||||
php:
|
||||
install: '1'
|
||||
ppa: php5
|
||||
packages: [php5-cli, php5-intl, php5-mcrypt, php5-enchant, php5-gd, php5-imagick, php5-memcache, php5-memcached, php5-curl, php5-mysql, php5-sqlite]
|
||||
ppa: php
|
||||
packages:
|
||||
- 'php5.6-cli'
|
||||
- 'php5.6-fpm'
|
||||
- 'php5.6-intl'
|
||||
- 'php5.6-mcrypt'
|
||||
- 'php5.6-enchant'
|
||||
- 'php5.6-gd'
|
||||
- 'php5.6-memcache'
|
||||
- 'php5.6-xml'
|
||||
- 'php5.6-xmlrpc'
|
||||
- 'php5.6-memcached'
|
||||
- 'php5.6-mbstring'
|
||||
- 'php5.6-curl'
|
||||
- 'php5.6-mysql'
|
||||
- 'php5.6-imagick'
|
||||
- 'php5.6-zip'
|
||||
- 'php5.6-sqlite3'
|
||||
- 'php5.6-bcmath'
|
||||
- 'php-pear'
|
||||
pecl_packages:
|
||||
- {name: zmq, package: zmq-beta}
|
||||
- {name: amqp, package: amqp-1.4.0}
|
||||
|
Reference in New Issue
Block a user