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.
This commit is contained in:
parent
67fab6fa5b
commit
0155dc1daf
|
@ -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'
|
||||
}
|
||||
}]
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -51,7 +51,7 @@
|
|||
"stratum-pool": "git+https://github.com/z-nomp/node-stratum-pool.git"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10"
|
||||
"node": ">=8.11"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PWD/node_modules/stratum-pool/node_modules/equihashverify/build/Release/:$PWD/node_modules/equihashverify/build/Release/ node init.js"
|
||||
|
|
Loading…
Reference in New Issue