Skip to content

Commit

Permalink
Merge pull request #32 from phpminds/feature/php7-stable
Browse files Browse the repository at this point in the history
Feature/php7 stable
  • Loading branch information
pavlakis committed Jan 4, 2016
2 parents 80bd339 + dbe6ccb commit 7b01bbc
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 44 deletions.
10 changes: 3 additions & 7 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ Vagrant.require_version ">= 1.5"

Vagrant.configure("2") do |config|



config.vm.provider :virtualbox do |v|
v.name = "phpminds"
v.customize [
Expand All @@ -24,14 +22,12 @@ Vagrant.configure("2") do |config|
end

config.vm.box = 'bento/centos-7.1'
config.vm.network :private_network, ip: "192.168.32.52", auto_correct: true
config.vm.network :forwarded_port, host: 15672, guest: 15672

config.vm.network :private_network, ip: "192.168.32.52"
#config.vm.network :forwarded_port, host: 15672, guest: 15672
config.ssh.forward_agent = true
config.vm.synced_folder "./", "/srv", type: "nfs"



config.vm.synced_folder ".", "/vagrant", disabled: true
config.ssh.pty = true
#############################################################
Expand Down
20 changes: 11 additions & 9 deletions ansible/roles/nginx/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@
# sudo: yes
# shell: systemctl start nginx

- name: Create directories and subdirectories for php-fpm.d
sudo: yes
shell: mkdir -p /usr/local/php7/etc/php-fpm.d/

- name: Create directory for sbin
sudo: yes
shell: mkdir -p /usr/local/php7/sbin/

- name: Create user group for web server
group: name={{ web_server.server_user_group }} state=present

Expand Down Expand Up @@ -39,23 +47,17 @@

- name: configure php-fpm base
sudo: yes
command: cp /usr/local/php7/etc/php-fpm.conf.default /etc/php-fpm.conf
command: cp /etc/opt/remi/php70/php-fpm.conf /etc/php-fpm.conf

- name: configure php-fpm www
sudo: yes
command: cp /usr/local/php7/etc/php-fpm.d/www.conf.default /usr/local/php7/etc/php-fpm.d/www.conf

#- name: Enable PHP-FPM for default site
# sudo: yes
# template: src=php-fpm.conf.tpl dest=/etc/php-fpm.d/default_app.conf


command: cp /etc/opt/remi/php70/php-fpm.d/www.conf /usr/local/php7/etc/php-fpm.d/www.conf

- name: Restart Nginx manually
sudo: yes
shell: systemctl restart nginx

- name: Start PHP-FPM manually
sudo: yes
command: /usr/local/php7/sbin/php-fpm -y /etc/php-fpm.conf
command: /opt/remi/php70/root/usr/sbin/php-fpm -y /etc/php-fpm.conf

3 changes: 0 additions & 3 deletions ansible/roles/php/handlers/main.yml

This file was deleted.

16 changes: 0 additions & 16 deletions ansible/roles/php/tasks/main.yml

This file was deleted.

24 changes: 19 additions & 5 deletions ansible/roles/php7/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
---
- name: Adding PHP 7 repo
- name: Add epel release
sudo: yes
template: src=php7-nightly.repo dest=/etc/yum.repos.d/php7-nightly.repo
yum: name=http://rpms.famillecollet.com/enterprise/remi-release-7.rpm state=present

- name: Install PHP 7 nightly
- name: Add PHP 7 embed
sudo: yes
yum: pkg=php7-nightly state=latest
yum: enablerepo=remi name=php70-php-embedded state=present

- name: Install PHP 7
sudo: yes
yum: name=php70 state=present

- name: Install PHP 7 packages
sudo: yes
yum: pkg={{ item }} state=latest
with_items: php.packages
when: php.packages is defined

- name: Create symlink for PHP 7
sudo: yes
file: src=/usr/local/php7/bin/php dest=/usr/bin/php state=link
file: src=/usr/bin/php70 dest=/usr/bin/php state=link

- name: Create php.ini defaults
sudo: yes
lineinfile: dest=/etc/opt/remi/php70/php.ini regexp='^;date.timezone =' line='date.timezone ={{ php.timezone }}'

- name: Create PHP-FPM service
sudo: yes
Expand Down
8 changes: 5 additions & 3 deletions ansible/vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ vagrant_local:
useVagrantCloud: '1',
syncType: nfs
}
#php:
# install: '1'
# packages: ['php56w', 'php56w-common', 'php56w-cli', 'php56w-opcache', 'php56w-fpm', 'php56w-mysql', 'php56w-pdo', 'php56w-mcrypt', 'php56w-intl', 'php56w-devel']

php:
install: '1'
packages: ['php70-php-cli', 'php70-php-common', 'php70-php-opcache', 'php70-php-fpm', 'php70-php-mysqlnd', 'php70-php-pdo', 'php70-php-mcrypt', 'php70-php-intl', 'php70-php-devel','php70-php-xml', 'php70-php-zip']
timezone: Europe/London

app:
env: development
Expand Down
2 changes: 1 addition & 1 deletion app/src/Action/CreateEventAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function dispatch(Request $request, Response $response, $args)
$supporter = $this->eventManager->getSupporterByID($request->getParam('supporter'));

$date = \DateTime::createFromFormat(
"Y-m-d H:i",
"d/m/Y H:i",
$request->getParam('start_date') . ' '
. ($request->getParam('start_time') < 10 ? '0' . $request->getParam('start_time') : $request->getParam('start_time'))

Expand Down

0 comments on commit 7b01bbc

Please sign in to comment.