Skip to content

Instantly share code, notes, and snippets.

View sgelliott's full-sized avatar

Shane Elliott sgelliott

View GitHub Profile
@sgelliott
sgelliott / docker-compose.yml
Created March 3, 2017 04:30
Docker compose example using volumes out of Dockerfile build context
version: '3'
services:
webserver:
# using a custom image that we already bulit with 'docker build -t customimage .'
image: customimage
container_name: web
# we want to sync the REQUIRED cms-public repo root folder with the container's public folder for the rails app
volumes:
@sgelliott
sgelliott / async-status-checks.js
Last active March 3, 2017 03:36
Trying to match request URLs with responses received from needle.getAsync
var needle = require('needle');
var Promise = require("bluebird");
Promise.promisifyAll(needle);
var allPaths = ["https://google.com", "https://microsoft.com", "https://github.com"];
var current = Promise.resolve();
Promise.map(allPaths, function (path) {
current = current.then(function () {
console.log("path: " + path); // path shows up here correctly - it's available