1.- Create new Log Group in CloudWatch
2.- Download agent in EC2 instance
sudo wget http://s3.amazonaws.com/aws-cloudwatch/downloads/latest/awslogs-agent-setup.py| package main | |
| import ( | |
| "fmt" | |
| "io" | |
| "os" | |
| ) | |
| var path = "/Users/novalagung/Documents/temp/test.txt" |
Based on https://gist.github.com/jjvillavicencio/4e3615a8219bb1a17c81c4541c6c317d
| <?php | |
| // Installed the need packages with Composer by running: | |
| // $ composer require aws/aws-sdk-php | |
| $filePath = "https://example.com/test.png"; | |
| require 'vendor/autoload.php'; | |
| $bucketName = 'YOUR_BUCKET_NAME'; | |
| $filePath = './YOUR_FILE_NAME.png'; |
| <?php | |
| /** | |
| * Global settings for project configuration | |
| * | |
| * PHP Version 7.1 | |
| * | |
| * @category Scafolding | |
| * @package CorePHP_Slim_Scafold | |
| * @author Eduardo Aguilar <[email protected]> | |
| * @copyright 2018 Eduardo Aguilar |
| <?php | |
| /** | |
| * Global settings for project configuration | |
| * | |
| * PHP Version 7.1 | |
| * | |
| * @category Dependency | |
| * @package CorePHP_Slim_Scafold | |
| * @author Eduardo Aguilar <[email protected]> | |
| * @copyright 2018 Eduardo Aguilar |
| <?php | |
| // Renderer settings | |
| return [ | |
| 'settigns' => [ | |
| 'renderer' => [ | |
| 'template_path' => __DIR__ . '/views', | |
| ], | |
| // twig view settings | |
| 'twig' => [ |
| #!/bin/bash | |
| echo $(dpkg --list | grep linux-image | awk '{ print $2 }' | sort -V | sed -n '/'`uname -r`'/q;p') $(dpkg --list | grep linux-headers | awk '{ print $2 }' | sort -V | sed -n '/'"$(uname -r | sed "s/\([0-9.-]*\)-\([^0-9]\+\)/\1/")"'/q;p') | xargs sudo apt-get -y purge |
| #!/bin/bash | |
| # Install PHP runtime | |
| PHPV=$(echo $(apt search php7. | grep '^php7\.' | head -1) | tr "/" "\n" | head -1) | |
| sudo apt install \ | |
| $PHPV \ | |
| $PHPV-cli \ | |
| $PHPV-cgi \ |
Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt
If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a
I will be using the root user, but would suggest creating a new user