SC5 / gulp-bobrsass-boilerplate

Gulp BoBrSASS Boilerplate
7 stars 13 forks source link

Angular.js branch Docker build includes unnecessary files #28

Closed kennu closed 9 years ago

kennu commented 9 years ago

The Docker build in the Angular.js branch includes a large number of files which seem unnecessary for running a service in production. They will cause some bloat and unnecessary dependencies/rebuilding in Docker images.

Assuming the application is designed to be pre-built (Bower, SASS, minifactions etc), only the final dist files and the production node_modules should be included in the Docker image. It would be clearer to put also the Bower modules under dist and exclude the entire app/src folder from the build.

app/.cache/
app/.cache/bower/
app/.cache/bower/packages/
app/.cache/bower/registry/
app/.cache/bower/registry/bower.herokuapp.com/
app/.cache/bower/registry/bower.herokuapp.com/list/
app/.cache/bower/registry/bower.herokuapp.com/lookup/
app/.cache/bower/registry/bower.herokuapp.com/search/
app/.githooks/
app/.githooks/pre-commit/
app/.githooks/pre-commit/jscs
app/.gitignore
app/.jscsrc
app/.jshintrc
app/.travis.yml
app/README.md
app/bower.json
app/gulpfile.js
app/.npm/(several gulp modules, unneeded dev dependencies)
app/node_modules/(several gulp modules, unneeded dev dependencies)
app/protractor.config.js
app/src/
app/src/.sass-cache/*
app/src/app/
app/src/app/app.js
app/src/app/controllers/
app/src/app/controllers/main-controller.js
app/src/app/controllers/sample-controller.js
app/src/app/main.js
app/src/assets/
app/src/assets/views/
app/src/assets/views/main.html
app/src/assets/views/sample.html
app/src/css/
app/src/css/styles.scss
app/src/index.html
app/temp/
app/temp/css/
app/temp/css/styles.css
app/temp/css/styles.css.map
app/tests/
app/tests/example.js
kennu commented 9 years ago

The npm install script should not perform a Bower install, because that makes it impossible to run "npm install" inside Docker without also having Bower installed. Bower should be run outside Docker, before building the image.

laurisvan commented 9 years ago

Pull request #36 should fix this. I wonder why it wasn't autoreferenced here, regardless of the fixes label and the issue number...