Skip to content

Instantly share code, notes, and snippets.

View gfogle's full-sized avatar

George Fogle gfogle

  • Boston MA
View GitHub Profile
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: Mailvelope v1.5.1
Comment: https://www.mailvelope.com
xsFNBFejq1UBEADRFfUrY/VIEfKBG8AP+aGrUim/X7IZIUl7mVVvYH4r1WOa
48LsLLGblU9EE4Bnkcmqs2ZbovmqEnLwP7Zw+jFUkAgSE9YmgOnNgkHDeuv0
aotXp40g6zOWweh9SPE1b2jhCx3DOErhhbj3BktmvNqjAy02TYyI3N4hbkqS
qWvMu41J53NuhytGZWtyQno958z8BT+GZSVxSTtDopXE3ahhD16gxAYENkw1
OyhA1OAHMBYJ2vArph67nhhYSaUVORkiiWKWMzl2AqFUoV6MgVKZPyhuCRJv
13lod0GQwPCw/n/PQTERohX0Ceo100UQQEQxTTvzcMEQ9cbA3VF1GDYdQy+0
@gfogle
gfogle / Basic Node Server
Last active February 27, 2018 03:40
A dockerfile and docker-compose.yml for creating a node server from scratch, putting your apps files into it, installing its dependencies, and starting the server
this file intentionally has a leading space to make it come first asciibetically for the purpose of naming the gist relative to what its content is for
@gfogle
gfogle / Basic Node Server - Dockerfile
Created February 27, 2018 03:47
A Dockerfile for creating a basic nodejs server image from Ubuntu 14.04
# pop that CD in and install ubuntu 14.04
FROM ubuntu:14.04
# RUN a command. In this case we're just getting
# the bash command straightened out here.
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# Install curl so that we can clone NVM to help
# us manage multiple versions of node
RUN apt-get update && \
# The docker-compose DSL syntax format we're using
version: "2.1"
# The containers we want to start and the images to start
# them from
services:
# our basic node server we'll name "basic"
basic:
# the directory path - relative to this compose file - where
@gfogle
gfogle / From Node Image - Dockerfile
Created February 27, 2018 04:34
The dockerfile for basic node server except that it uses the base node image
# lets start from an image that already has nodejs installed
FROM node:8.9.4
# Essentially running mkdir <name> inside the current working
# directory, and then cd <name>
WORKDIR /usr/src/app
# copy the package.json from your computer, into the
# current directory inside of the container. Then install
# all the dependencies. Then copy the rest of the files
@gfogle
gfogle / From Node Image - docker-compose.yml
Created February 27, 2018 04:54
The new docker compose using a volume mount so that we can watch files for changes
# The docker-compose DSL syntax format we're using
version: "2.1"
# The containers we want to start and the images to start
# them from
services:
# our basic node server we'll name "basic"
basic:
# the directory path - relative to this compose file - where
@gfogle
gfogle / Exposed Debug - launch.json
Last active February 27, 2018 05:11
A basic launch.json to allow attaching to a node process inside of a docker container
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "attach",
"name": "Attach to Docker",
"address": "localhost",
"port": 9229,
"localRoot": "${workspaceRoot}/exposed-debug-ports",
# The docker-compose DSL syntax format we're using
version: "2.1"
# The containers we want to start and the images to start
# them from
services:
#
# Base postgres 9.6 image that we can connect to. This
# will get downloaded straight from Docker Hub when we
# The docker-compose DSL syntax format we're using
version: "2.1"
# The containers we want to start and the images to start
# them from
services:
#
# Base postgres 9.6 image that we can connect to. This
# will get downloaded straight from Docker Hub when we
# The docker-compose DSL syntax format we're using
version: "2.1"
# The containers we want to start and the images to start
# them from
services:
#
# Base postgres 9.6 image that we can connect to. This
# will get downloaded straight from Docker Hub when we