See Amazon tutorial: Getting Started with Amazon EC2 Linux Instances
See Amazon tutorial: Installing a LAMP Web Server on Amazon Linux
| # name this file as "startup.sh" and call it from "startup command" as "/home/startup.sh" | |
| # check out my YouTube video "https://youtu.be/-PGhVFsOnGA" | |
| cp /home/default /etc/nginx/sites-enabled/default | |
| cp /home/php.ini /usr/local/etc/php/conf.d/php.ini | |
| # install support for webp file conversion | |
| apt-get update --allow-releaseinfo-change && apt-get install -y libfreetype6-dev \ | |
| libjpeg62-turbo-dev \ |
| # Change to the project directory | |
| cd $FORGE_SITE_PATH | |
| # Turn on maintenance mode | |
| php artisan down || true | |
| # Pull the latest changes from the git repository | |
| # git reset --hard | |
| # git clean -df | |
| git pull origin $FORGE_SITE_BRANCH |
| # Dont forget to set the env variable "CERT_DOMAIN", and either fill in your email below or use an env variable for that too. | |
| # Also note that this config is using the LetsEncrypt staging server, remove the flag when ready! | |
| # @source https://gist.github.com/tony-gutierrez/198988c34e020af0192bab543d35a62a#file-aws_single_letsencrypt-yaml-L2 | |
| Resources: | |
| sslSecurityGroupIngress: | |
| Type: AWS::EC2::SecurityGroupIngress | |
| Properties: | |
| GroupId: {"Fn::GetAtt" : ["AWSEBSecurityGroup", "GroupId"]} | |
| IpProtocol: tcp |
| <?php | |
| namespace App\Providers; | |
| use Illuminate\Support\Collection; | |
| use Illuminate\Pagination\LengthAwarePaginator; | |
| class AppServiceProvider extends ServiceProvider | |
| { | |
| public function boot() |
See Amazon tutorial: Getting Started with Amazon EC2 Linux Instances
See Amazon tutorial: Installing a LAMP Web Server on Amazon Linux
| <?php | |
| class PaystackFees | |
| { | |
| const DEFAULT_PERCENTAGE = 0.015; | |
| const DEFAULT_ADDITIONAL_CHARGE = 10000; | |
| const DEFAULT_THRESHOLD = 250000; | |
| const DEFAULT_CAP = 200000; | |
| public static $default_percentage = PaystackFees::DEFAULT_PERCENTAGE; |
| # Dont forget to set the env variable "certdomain", and either fill in your email below or use an env variable for that too. | |
| # Also note that this config is using the LetsEncrypt staging server, remove the flag when ready! | |
| Resources: | |
| sslSecurityGroupIngress: | |
| Type: AWS::EC2::SecurityGroupIngress | |
| Properties: | |
| GroupId: {"Fn::GetAtt" : ["AWSEBSecurityGroup", "GroupId"]} | |
| IpProtocol: tcp | |
| ToPort: 443 |