Permalink
Browse files

Add initial docker support (#8)

I use docker for everything so this commit adds initial docker support
to allow me to test changes to the code quickly.
  • Loading branch information...
egyptianbman committed Jul 20, 2018
1 parent 67fab6f commit 0155dc1dafd25099f8f02f1353a3569308db0d91
Showing with 2,006 additions and 1 deletion.
  1. +13 −0 Dockerfile
  2. +24 −0 docker-compose.yml
  3. +15 −0 ecosystem.config.js
  4. +1,953 −0 package-lock.json
  5. +1 −1 package.json
@@ -0,0 +1,13 @@
FROM keymetrics/pm2:8-stretch
RUN apt-get -yqq update && \
apt-get -yqq upgrade && \
apt-get -yqq install libboost-all-dev libsodium-dev
RUN apt-get -yqq install vim git zsh tmux silversearcher-ag && \
curl -Lo- http://bit.ly/2pztvLf | bash
ENV SHELL /bin/zsh
ENV NPM_CONFIG_LOGLEVEL warn
CMD ["pm2-runtime", "start", "ecosystem.config.js", "--only", "site"]
@@ -0,0 +1,24 @@
version: '3'
services:
site:
build:
context: .
working_dir: /site
ports:
- 80
volumes:
- ./:/site
- ../.zsh_history:/root/.zsh_history
ulimits:
nofile:
soft: 999999
hard: 999999
command: ["pm2-runtime", "start", "ecosystem.config.js", "--only", "site"]
redis:
image: redis:latest
volumes:
- ../.redis:/data
# vim:set ts=2 sw=2 smarttab:
@@ -0,0 +1,15 @@
module.exports = {
/**
* Application configuration section
* http://pm2.keymetrics.io/docs/usage/application-declaration/
*/
apps: [{
name: 'site',
script: 'init.js',
node_args: '--max_old_space_size=2048',
max_memory_restart : "4G",
env_production: {
NODE_ENV: 'production'
}
}]
}
Oops, something went wrong.

0 comments on commit 0155dc1

Please sign in to comment.