Update Dockerfile

This commit is contained in:
jysperm
2015-07-20 14:40:48 +08:00
parent 3cd0201752
commit b309fd5f99
4 changed files with 16 additions and 7 deletions

1
.dockerignore Normal file
View File

@@ -0,0 +1 @@
.git

View File

@@ -8,12 +8,22 @@ RUN apt-get update &&\
RUN npm install -g coffee-script gulp bower
WORKDIR /rootpanel
ADD . ./
RUN npm install
RUN bower install --allow-root
RUN gulp build
RUN rm /etc/nginx/sites-enabled/default
RUN sed -i "s/user www-data;/user root;/g" /etc/nginx/nginx.conf
ADD sample/nginx.conf /etc/nginx/sites-enabled/rpadmin
EXPOSE 80
WORKDIR /rootpanel
CMD service nginx start &&\
service mongodb start &&\
service redis-server start &&\
/bin/bash
npm start

View File

@@ -13,14 +13,13 @@ minifyCss = require 'gulp-minify-css'
bowerFiles = require 'main-bower-files'
runSequence = require 'run-sequence'
gulp.task 'install:bower', shell.task 'bower install'
gulp.task 'clean', ->
del 'public/*'
gulp.task 'vendor:styles', ->
gulp.src bowerFiles()
.pipe filter '*.css'
.pipe filter '*.less'
.pipe less()
.pipe concat 'vendor.css'
.pipe minifyCss()
.pipe gulp.dest 'public/vendor'
@@ -40,7 +39,6 @@ gulp.task 'vendor:fonts', ->
gulp.task 'build:vendor', ->
runSequence [
'install:bower'
'clean'
], [
'vendor:styles'

View File

@@ -17,7 +17,7 @@
],
"main": "core",
"scripts": {
"prepushlish": "gulp build",
"prepushlish": "bower install && gulp build",
"start": "coffee app.coffee",
"test": "mocha --compilers coffee:coffee-script/register --require test/env --recursive core/test",
"docker-build": "docker build -t=jysperm/rootpanel .",