- delete all containers : to run sudo commands on script and to not get propted for the password add
username ALL = NOPASSWD: /fullpath/to/command, /fullpath/to/othercommand
/fullpath/to/command can be /usr/bin/apt and this line shoud be added to
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
The main log file is the mongod.log. You can specify the log file location when you are starting the mongod process but if you have installed on Ubuntu from a package then you log file will normally be located in /var/log/mongodb/mongod.log.
You can tail the log file using:
tail -f /var/log/mongodb/mongod.log
From the Mongo shell you can also view the log file using:
show logs
| storage: | |
| dbPath: "/data/db" | |
| journal: | |
| enabled: true | |
| systemLog: | |
| destination: file | |
| path: "/var/log/mongodb.log" | |
| logAppend: true | |
| timeStampFormat: iso8601-utc | |
| processManagement: |
| <?php | |
| /* | |
| Reference: | |
| http://code.tutsplus.com/tutorials/why-you-should-be-using-phps-pdo-for-database-access--net-12059 | |
| */ | |
| function connect(){ | |
| /* |
| # Set the variable value in *.tfvars file | |
| # or using -var="do_token=..." CLI option | |
| variable "do_token" {} | |
| variable "ssh_key_name" {} | |
| # Configure the DigitalOcean Provider | |
| provider "digitalocean" { | |
| token = "${var.do_token}" | |
| } |
| resource "digitalocean_droplet" "haproxy-www" { | |
| image = "ubuntu-14-04-x64" | |
| name = "haproxy-www" | |
| region = "nyc2" | |
| size = "512mb" | |
| private_networking = true | |
| ssh_keys = [ | |
| "${var.ssh_fingerprint}" | |
| ] | |
| connection { |
| <?php | |
| class Mysql{ | |
| static private $link = null; | |
| static private $info = array( | |
| 'last_query' => null, | |
| 'num_rows' => null, | |
| 'insert_id' => null | |
| ); |
| ====== | |
| Videos | |
| ====== | |
| DevOps | |
| What is DevOps? by Rackspace - Really great introduction to DevOps | |
| https://www.youtube.com/watch?v=_I94-tJlovg | |
| Sanjeev Sharma series on DevOps (great repetition to really get the DevOps concept) |