This file contains hidden or 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
| # Change to the project directory | |
| cd /home/forge/domain.com | |
| # Turn on maintenance mode | |
| php artisan down | |
| # Pull the latest changes from the git repository | |
| # git reset --hard | |
| # git clean -df | |
| git pull origin master |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <title>Add React in One Minute</title> | |
| </head> | |
| <body> | |
| <h2>Add React in One Minute</h2> | |
| <p>This page demonstrates using React with no build tooling.</p> |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8" /> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge" /> | |
| <title>Hello React</title> | |
| <script src="https://unpkg.com/react@16/umd/react.development.js"></script> | |
| <script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script> | |
| <script src="https://unpkg.com/babel-standalone@6.26.0/babel.js"></script> |
This file contains hidden or 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
| # | |
| #DO droplet metadata intro + for DO-API | |
| # [https://www.digitalocean.com/community/tutorials/an-introduction-to-droplet-metadata#how-to-retrieve-droplet-metadata#digitalocean-api] | |
| # | |
| #intro to cloud-config scripting (source of following examples) | |
| # [https://www.digitalocean.com/community/tutorials/an-introduction-to-cloud-config-scripting] | |
| # | |
| #howto | |
| # [https://www.digitalocean.com/community/tutorials/how-to-use-cloud-config-for-your-initial-server-setup] | |
| # |
This file contains hidden or 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
| $ doctl compute size list | |
| Slug Memory VCPUs Disk Price Monthly Price Hourly | |
| 512mb 512 1 20 5.00 0.007440 | |
| s-1vcpu-1gb 1024 1 25 5.00 0.007440 | |
| 1gb 1024 1 30 10.00 0.014880 | |
| s-1vcpu-2gb 2048 1 50 10.00 0.014880 | |
| s-1vcpu-3gb 3072 1 60 15.00 0.022320 | |
| s-2vcpu-2gb 2048 2 60 15.00 0.022320 | |
| s-3vcpu-1gb 1024 3 60 15.00 0.022320 | |
| 2gb 2048 2 40 20.00 0.029760 |
This file contains hidden or 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
| /* | |
| Using Cloud Functions, here's what I've come up with for anyone who wants to | |
| add a timestamp field in a Firestore document. You need to have the Firebase Admin SDK installed in | |
| addition to the general setup for Cloud Functions as detailed in the Firebase documentation. | |
| */ | |
| const functions = require('firebase-functions'); | |
| // The Firebase Admin SDK to access the Firebase Realtime Database. | |
| const admin = require('firebase-admin'); |
This file contains hidden or 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
| server { | |
| server_name DOMAIN_NAME; | |
| access_log /var/log/nginx/DOMAIN_NAME_access.log; | |
| error_log /var/log/nginx/DOMAIN_NAME_error.log; | |
| rewrite_log on; | |
| root /var/www/DOMAIN_NAME/public; | |
| index index.php index.html; |
This file contains hidden or 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
| # | |
| # For sites which prefer IPv4 connections change the last line to | |
| # | |
| precedence ::ffff:0:0/96 100 |
This file contains hidden or 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
| ## | |
| # You should look at the following URL's in order to grasp a solid understanding | |
| # of Nginx configuration files in order to fully unleash the power of Nginx. | |
| # http://wiki.nginx.org/Pitfalls | |
| # http://wiki.nginx.org/QuickStart | |
| # http://wiki.nginx.org/Configuration | |
| # | |
| # Generally, you will want to move this file somewhere, and start with a clean | |
| # file but keep this around for reference. Or just disable in sites-enabled. | |
| # |
This file contains hidden or 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
| # =================== YOUR DATA ======================== | |
| SERVER_NAME="some-server-name" | |
| SERVER_IP="111.111.11.11" | |
| USER="someuser" | |
| SUDO_PASSWORD="secret-password-one" | |
| MYSQL_ROOT_PASSWORD="secret-password-two" |
NewerOlder