Commit fcb27f9f authored by Richard Torenvliet's avatar Richard Torenvliet Committed by Richard Torenvliet

Move to docker

parent 35a4d22f
FROM node:latest
RUN \
apt-get update && \
apt-get install -y ruby ruby-dev supervisor nginx && \
rm -rf /var/lib/apt/lists/*
RUN npm update -g npm
RUN npm -g install grunt-cli karma bower
WORKDIR /app
ADD . /app
VOLUME ./src:/app/src/
RUN npm install
RUN bower install --config.interactive=false --allow-root
CMD etc/bootstrap.sh
......@@ -30,7 +30,7 @@ module.exports = function ( grunt ) {
'dev': {
// the server root directory
root: 'build/',
root: '/app/build/',
// the server port
// can also be written as a function, e.g.
......@@ -54,6 +54,7 @@ module.exports = function ( grunt ) {
}
};
/**
* This is the configuration object Grunt uses to give each plugin its
* instructions.
......
{
"name": "Interactive",
"version": "0.3.2",
"version": "0.0.1",
"devDependencies": {
"angular": "~1.2",
"angular-mocks": "~1.2",
......@@ -11,3 +11,4 @@
},
"dependencies": {}
}
SUPERVISORD_CONFIG=/app/etc/supervisord/dev.conf
cp /app/etc/nginx/dev.conf /etc/nginx/nginx.conf
exec /usr/bin/supervisord -n -c ${SUPERVISORD_CONFIG}
worker_processes 4;
user root;
pid /tmp/nginx.pid;
daemon off;
error_log /tmp/nginx.error.log;
events {
worker_connections 1024;
accept_mutex off;
}
http {
charset utf-8;
client_max_body_size 500M;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 60;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /dev/stdout;
gzip on;
gzip_static on;
server {
listen 80 default;
root /app/build/;
try_files $uri $uri/index.html =404;
}
}
[supervisord]
nodaemon=true
[program:nginx]
autostart=true
autorestart=true
redirect_stderr=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
command=/usr/sbin/nginx
build:
docker build -t pixi-game .
run:
grunt http-server:dev
docker run --rm -ti -p 8282:80 pixi-game
# inside docker
install:
./etc/bootstrap.sh
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment