Skip to content

Instantly share code, notes, and snippets.

View pascalandy's full-sized avatar
:octocat:
Rocking the git

Pascal Andy pascalandy

:octocat:
Rocking the git
View GitHub Profile
@pascalandy
pascalandy / install.sh
Created March 3, 2016 00:28 — forked from wdullaer/install.sh
Install Latest Docker and Docker-compose on Ubuntu
# Ask for the user password
# Script only works if sudo caches the password for a few minutes
sudo true
# Install kernel extra's to enable docker aufs support
sudo apt-get -y install linux-image-extra-$(uname -r)
# Add Docker PPA and install latest version
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
<html>
<head>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" integrity="sha256-MfvZlkHCEqatNoGiOXveE8FIwMzZg4W85qfrfIFBfYc= sha512-dTfge/zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz/ixG7ArTxmDjLXDmezHubeNikyKGVyQ==" crossorigin="anonymous">
<title>Docker nginx Tutorial</title>
</head>
<body>
<div class="container">
<h1>Hello Digital Ocean</h1>
<p>This page is served within a container and maintained by Pascal A.n.d.y</p>
</div>
# You may add here your
# server {
# ...
# }
# statements for each of your virtual hosts to this file
##
# 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
This Gist is used to upload RANDOM screen shots and take the absolute pictures links.
example:
![screenr 2016-03-05 at 11 12 44 am](https://cloud.githubusercontent.com/assets/6694151/13548655/3b247570-e2c3-11e5-94f1-8745d79ffdd2.jpg)
var path = require('path'),
config;
config = {
// ### Production
// When running Ghost in the wild, use the production environment
// Configure your URL and mail settings here
production: {
url: 'http://mysite.com',
mail: {
server {
listen 80;
server_name mysite.com;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:2368;
}
}
andy@ams14:/var/www/ghost$ sudo npm install --production
npm WARN cannot run in wd ghost@0.7.8 npm install semver && node -e "require('./core/server/utils/startup-check.js').nodeVersion()" (wd=/var/www/ghost)
npm WARN peerDependencies The peer dependency knex@>=0.6.10 <0.10.0 included from bookshelf will no
npm WARN peerDependencies longer be automatically installed to fulfill the peerDependency
npm WARN peerDependencies in npm 3+. Your application will need to depend on it explicitly.
> jsonpath@0.2.2 postinstall /var/www/ghost/node_modules/jsonpath
> node lib/aesprim.js > generated/aesprim-browser.js
-
andy@ams14:/var/www/ghost$ sudo npm start --production
> ghost@0.7.8 start /var/www/ghost
> node index
WARNING: Ghost is attempting to use a direct method to send email.
It is recommended that you explicitly configure an email service.
Help and documentation can be found at http://support.ghost.org/mail.
Migrations: Database initialisation required for version 004
ghost@ams14:/var/www/ghost$ forever start index.js
warn: --minUptime not set. Defaulting to: 1000ms
warn: --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
info: Forever processing file: index.js
usage: ./flash [options] name-of-rpi.img
Flash a local or remote Raspberry Pi SD card image.
OPTIONS:
--help|-h Show this message
--bootconf|-C Copy this config file to /boot/config.txt
--config|-c Copy this config file to /boot/device-init.yaml (or occidentalis.txt)
--hostname|-n Set hostname for this SD image
--ssid|-s Set WiFi SSID for this SD image