mirror of
https://github.com/HackPlan/RootPanel.git
synced 2026-01-12 22:27:09 +08:00
Update Dockerfile
This commit is contained in:
1
.dockerignore
Normal file
1
.dockerignore
Normal file
@@ -0,0 +1 @@
|
||||
.git
|
||||
14
Dockerfile
14
Dockerfile
@@ -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
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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 .",
|
||||
|
||||
Reference in New Issue
Block a user