This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo iptables -A INPUT -i lo -j ACCEPT | |
sudo iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT | |
sudo iptables -A INPUT -p tcp --dport 22 -j ACCEPT | |
sudo iptables -A INPUT -p tcp --dport 80 -j ACCEPT | |
sudo iptables -A INPUT -p tcp --dport 443 -j ACCEPT | |
sudo iptables -A INPUT -j DROP | |
# Allow traffic coming from docker0 interface | |
sudo iptables -I INPUT 6 -i docker0 -p tcp --dport 3306 -j ACCEPT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Let Apache be initial owner | |
chown -R www-data:www-data /var/www/html | |
# Create an admin user | |
adduser admin | |
usermod -a -G sudo admin | |
usermod -a -G www-data admin | |
# Create a deployment user | |
adduser deployer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//================================================================================= | |
// WEBPACK MODULES | |
//================================================================================= | |
const ora = require('ora'); | |
const path = require('path'); | |
const webpack = require('webpack'); | |
//================================================================================= | |
// WEBPACK OUTPUT PATHS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: UPDATE YUM :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: | |
sudo yum update -y | |
:: INSTALL WEBSERVER ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: | |
sudo yum install httpd24 | |
sudo service httpd start | |
sudo chkconfig httpd on | |
chkconfig --list httpd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CREATE USERS | |
sudo su <enter root password> | |
adduser devops | |
usermod -aG sudo devops | |
# SSH KEYGEN (LOCAL) | |
ssh-keygen <follow prompts and save> | |
cat ~/.ssh/yourkey_rsa.pub <copy contents> | |
# SSH KEYGEN (SERVER) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# VAGRANT FILE | |
config.vm.network "forwarded_port", guest: 80, host: 8080 | |
config.vm.network "forwarded_port", guest: 3306, host: 33060 | |
config.vm.network "private_network", ip: "192.168.33.10" | |
config.vm.synced_folder "./webroot", "/var/www/html", create:true, owner:"apache", group:"apache" | |
# MYSQL BIND | |
Change 127.0.0.1 to 0.0.0.0 | |
# MYSQL/MARIADB COMMAND - ONLY DO THIS FOR LOCAL DEVELOPMENT!!! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# CREATE USERS | |
sudo su <enter root password> | |
adduser devops | |
usermod -aG sudo devops | |
# SSH KEYGEN (LOCAL) | |
ssh-keygen <follow prompts and save> | |
cat ~/.ssh/yourkey_rsa.pub <copy contents> | |
# SSH KEYGEN (SERVER) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$lat = $this->listing->latitude; | |
$lon = $this->listing->longitude; | |
$params = [ | |
"index" => "listings", | |
"body" => [ | |
"from" => 0, | |
"size" => 26, | |
"query" => [ | |
"bool" => [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$default = [ | |
"query_string" => [ | |
"default_operator" => "AND", | |
"fields" => ["name","desc","tags","city"], | |
"query" => $query | |
] | |
]; | |
$filtered = [ | |
"bool" => [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//================================================================================= | |
// WEBPACK MODULES | |
//================================================================================= | |
const ora = require('ora'); | |
const path = require('path'); | |
const chalk = require('chalk'); | |
const rimraf = require('rimraf') | |
const webpack = require('webpack'); | |
const config = require('./webpack.config'); |
NewerOlder