Skip to content

Instantly share code, notes, and snippets.

@felixrabe
Created August 8, 2014 17:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save felixrabe/2c352646a698545a096f to your computer and use it in GitHub Desktop.
Save felixrabe/2c352646a698545a096f to your computer and use it in GitHub Desktop.
Source code for my blog post "Simple Blog Deployment using Ghost and Docker"
config = require('./node_modules/ghost/config.example.js');
config.development.server.host = '0.0.0.0';
config.production.server.host = '0.0.0.0';
module.exports = config;
# DOCKER-VERSION 1.1.2
FROM ubuntu:14.04
# Speed up apt-get according to https://gist.github.com/jpetazzo/6127116
RUN echo "force-unsafe-io" > /etc/dpkg/dpkg.cfg.d/02apt-speedup
RUN echo "Acquire::http {No-Cache=True;};" > /etc/apt/apt.conf.d/no-cache
# Update the distribution
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
RUN apt-get upgrade -y
# https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
RUN apt-get install -y software-properties-common
RUN add-apt-repository -y ppa:chris-lea/node.js
RUN apt-get update
RUN apt-get install -y python-software-properties python g++ make nodejs git # git needed by 'npm install'
ADD . /src
RUN cd /src; npm install --save ghost
ENTRYPOINT ["node", "/src/server.js"]
# Override ubuntu:14.04 CMD directive:
CMD []
EXPOSE 2368
#!/usr/bin/env node
var ghost = require('ghost');
ghost({
config: __dirname + '/config.js'
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment