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