Add docker support for dev

This commit is contained in:
Jesper Hess 2017-02-07 19:09:55 +01:00
parent 9b7c1a0a8d
commit aed0096760
Signed by: graffen
GPG key ID: 351A89E40D763F0F
3 changed files with 13 additions and 47 deletions

View file

@ -1,2 +1,6 @@
source 'https://rubygems.org' source 'https://rubygems.org'
gem 'github-pages' gem 'github-pages'
group :jekyll_plugins do
gem 'jekyll-livereload'
end

8
docker-compose.yml Normal file
View file

@ -0,0 +1,8 @@
jekyll:
image: graffen/jekyll
command: jekyll serve --livereload --reload_port 35729
ports:
- 4000:4000
- 35729:35729
volumes:
- .:/srv/jekyll

View file

@ -1,46 +0,0 @@
var gulp = require('gulp');
var browserSync = require('browser-sync');
var cp = require('child_process');
var messages = {
jekyllBuild: '<span style="color: grey">Running:</span> $ jekyll build'
};
/**
* Build the Jekyll Site
*/
gulp.task('jekyll-build', function (done) {
browserSync.notify(messages.jekyllBuild);
return cp.spawn('bundle', ['exec','jekyll','build'], {stdio: 'inherit'})
.on('close', done);
});
/**
* Rebuild Jekyll & do page reload
*/
gulp.task('jekyll-rebuild', ['jekyll-build'], function () {
browserSync.reload();
});
/**
* Wait for jekyll-build, then launch the Server
*/
gulp.task('browser-sync', ['jekyll-build'], function() {
browserSync.init({
server: '_site'
});
});
/**
* Watch html/md files, run jekyll & reload BrowserSync
* if you add folder for pages, collection or datas, add them to this list
*/
gulp.task('watch', function () {
gulp.watch(['./*', '_layouts/*', 'assets/**/*', 'keysigning/*'], ['jekyll-rebuild']);
});
/**
* Default task, running just `gulp` will compile the sass,
* compile the jekyll site, launch BrowserSync & watch files.
*/
gulp.task('default', ['browser-sync', 'watch']);