Commit a1d15904 authored by Richard Torenvliet's avatar Richard Torenvliet

Add docker support and assets

parent fcb27f9f
{
"directory": "vendor",
"json": "bower.json",
"interactive": false
}
FROM node:latest
FROM ubuntu:14.10
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
RUN apt-get update && apt-get install -y nginx git supervisor nodejs npm firefox
RUN ln -s /usr/bin/nodejs /usr/bin/node
RUN npm -g install grunt-cli karma bower less
WORKDIR /app
ADD . /app
VOLUME ./src:/app/src/
ADD package.json /app/package.json
RUN npm install
ADD bower.json /app/bower.json
ADD .bowerrc /app/.bowerrc
RUN bower install --config.interactive=false --allow-root
ADD . /app
CMD etc/bootstrap.sh
......@@ -474,7 +474,8 @@ module.exports = function ( grunt ) {
* plugin should auto-detect.
*/
options: {
livereload: true
livereload: true,
interval: 1000
},
/**
......@@ -497,7 +498,7 @@ module.exports = function ( grunt ) {
files: [
'<%= app_files.js %>'
],
tasks: [ 'jshint:src', 'karma:unit:run', 'copy:build_appjs' ]
tasks: [ 'jshint:src', 'copy:build_appjs' ]
},
/**
......@@ -508,7 +509,7 @@ module.exports = function ( grunt ) {
files: [
'<%= app_files.coffee %>'
],
tasks: [ 'coffeelint:src', 'coffee:source', 'karma:unit:run', 'copy:build_appjs' ]
tasks: [ 'coffeelint:src', 'coffee:source', 'copy:build_appjs' ]
},
/**
......@@ -557,7 +558,7 @@ module.exports = function ( grunt ) {
files: [
'<%= app_files.jsunit %>'
],
tasks: [ 'jshint:test', 'karma:unit:run' ],
tasks: [ 'jshint:test' ],
options: {
livereload: false
}
......@@ -571,7 +572,7 @@ module.exports = function ( grunt ) {
files: [
'<%= app_files.coffeeunit %>'
],
tasks: [ 'coffeelint:test', 'karma:unit:run' ],
tasks: [ 'coffeelint:test' ],
options: {
livereload: false
}
......@@ -589,7 +590,7 @@ module.exports = function ( grunt ) {
* before watching for changes.
*/
grunt.renameTask( 'watch', 'delta' );
grunt.registerTask( 'watch', [ 'build', 'karma:unit', 'delta' ] );
grunt.registerTask( 'watch', [ 'build', 'delta' ] );
/**
* The default task is to build and compile.
......@@ -602,9 +603,7 @@ module.exports = function ( grunt ) {
grunt.registerTask( 'build', [
'clean', 'html2js', 'jshint', 'coffeelint', 'coffee', 'less:build',
'concat:build_css', 'copy:build_app_assets', 'copy:build_vendor_assets',
'copy:build_appjs', 'copy:build_vendorjs', 'copy:build_vendorcss', 'index:build', 'karmaconfig',
'karma:continuous'
]);
'copy:build_appjs', 'copy:build_vendorjs', 'copy:build_vendorcss', 'index:build' ]);
/**
* The `compile` task gets your app ready for deployment by concatenating and
......
......@@ -8,3 +8,11 @@ redirect_stderr=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
command=/usr/sbin/nginx
[program:watch]
autostart=true
autorestart=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
directory=/app/
command=grunt watch
.PHONY: build
ARGUMENTS=
ARGUMENTS+= -v ./etc/:/app/etc/
DIR=$(shell pwd)
build:
docker build -t pixi-game .
run:
docker run --rm -ti -p 8282:80 pixi-game
docker run --rm -ti -p 8282:80 -v $(DIR)/src/:/app/src/ pixi-game
# inside docker
install:
......
......@@ -8,7 +8,7 @@ angular.module( 'Interactive', [
'Interactive.game.tapdance'
])
.config( function ( $stateProvider, $urlRouterProvider ) {
.config(function ($stateProvider, $urlRouterProvider) {
$urlRouterProvider.otherwise( '/index' );
})
......
<h1>Intro</h1>
<a ui-sref='game-tapdance'>Go to the game</a>
<!---
<canvas pixi="stage" pixi-render="pixiRender"
pixi-transparent="false" width="900" height="400">
</canvas>
-->
This diff is collapsed.
This diff is collapsed.
......@@ -15,6 +15,7 @@
</head>
<body>
<div class="container" ui-view="main">
test
</div>
</body>
</html>
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