Skip to content

Commit

Permalink
Alteração na estrutura da instância-base.
Browse files Browse the repository at this point in the history
Visando adaptar ao uso de repositórios GIT.
  • Loading branch information
carromeu committed Sep 29, 2016
1 parent 1954265 commit f77944b
Show file tree
Hide file tree
Showing 64 changed files with 44 additions and 46 deletions.
12 changes: 6 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
app/backup
app/cache
app/file
app/vendor
box/.vagrant
box/vagrant.log
backup
cache
file
vendor
.vagrant
vagrant.log
File renamed without changes.
24 changes: 24 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Vagrant.configure("2") do |config|
# To activate...
# - PHP 7.0, use "bento/ubuntu-16.04".
# - PHP 5.6, use "debian/jessie64".

# config.vm.box = "bento/ubuntu-16.04"
config.vm.box = "debian/jessie64"

config.vm.network "forwarded_port", guest: 80, host: 8090
config.vm.network "forwarded_port", guest: 5432, host: 5431

config.vm.network "private_network", ip: "192.168.33.10"

config.vm.synced_folder ".", "/var/www/app", type: "virtualbox"
config.vm.synced_folder "db", "/var/lib/postgresql/db", type: "virtualbox"
config.vm.synced_folder ".", "/vagrant", type: "virtualbox"

# To activate...
# - PHP 7.0, use "box/php7/bootstrap.sh".
# - PHP 5.6, use "box/php5/bootstrap.sh".

# config.vm.provision "shell", path: "box/php7/bootstrap.sh"
config.vm.provision "shell", path: "box/php5/bootstrap.sh"
end
2 changes: 0 additions & 2 deletions app/index.php

This file was deleted.

14 changes: 0 additions & 14 deletions box-php7/Vagrantfile

This file was deleted.

14 changes: 0 additions & 14 deletions box/Vagrantfile

This file was deleted.

16 changes: 8 additions & 8 deletions box/bootstrap.sh → box/php5/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,27 +70,27 @@ echo "Configuring services..."

echo "PostgreSQL..."

cp -f /vagrant/settings/pg_hba.conf /etc/postgresql/9.4/main/pg_hba.conf
cp -f /vagrant/box/php5/settings/pg_hba.conf /etc/postgresql/9.4/main/pg_hba.conf

cp -f /vagrant/settings/postgresql.conf /etc/postgresql/9.4/main/postgresql.conf
cp -f /vagrant/box/php5/settings/postgresql.conf /etc/postgresql/9.4/main/postgresql.conf

/etc/init.d/postgresql restart

echo "Done!"

echo "Apache and PHP..."

cp -f /vagrant/settings/php_web.ini /etc/php5/apache2/php.ini
cp -f /vagrant/box/php5/settings/php_web.ini /etc/php5/apache2/php.ini

cp -f /vagrant/settings/php_cli.ini /etc/php5/cli/php.ini
cp -f /vagrant/box/php5/settings/php_cli.ini /etc/php5/cli/php.ini

rm -rf /var/www/html

mkdir -p /var/www/log

cp -f /vagrant/settings/apache2.conf /etc/apache2/apache2.conf
cp -f /vagrant/box/php5/settings/apache2.conf /etc/apache2/apache2.conf

cp -f /vagrant/settings/000-default.conf /etc/apache2/sites-available/000-default.conf
cp -f /vagrant/box/php5/settings/000-default.conf /etc/apache2/sites-available/000-default.conf

a2enmod rewrite

Expand All @@ -100,15 +100,15 @@ echo "Done!"

echo "SSH..."

cp -f /vagrant/settings/sshd_config /etc/ssh/sshd_config
cp -f /vagrant/box/php5/settings/sshd_config /etc/ssh/sshd_config

/etc/init.d/ssh restart

echo "Done!"

echo "CRON..."

cp /vagrant/settings/cron /etc/cron.d/titan
cp /vagrant/box/php5/settings/cron /etc/cron.d/titan

/etc/init.d/cron reload
/etc/init.d/cron restart
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions box/settings/pg_hba.conf → box/php5/settings/pg_hba.conf
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ local all postgres peer
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 md5
host all all 10.0.2.2/32 trust
# IPv6 local connections:
host all all ::1/128 md5
# Allow replication connections from localhost, by a user with the
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
],
"minimum-stability": "stable",
"require": {
"php": ">=5.2,<7.0"
"php": ">=5.2"
},
"config": {
"vendor-dir": "app/vendor"
"vendor-dir": "vendor"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?php

header ('Location: titan.php');
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit f77944b

Please sign in to comment.