Skip to content

Commit f539bad

Browse files
Feature/docker compose (#19)
* Using Docker to run server locally * Using global bundle directory * Update README file * Update README file
1 parent aa31dc8 commit f539bad

File tree

5 files changed

+32
-9
lines changed

5 files changed

+32
-9
lines changed

.bundle/config

Lines changed: 0 additions & 2 deletions
This file was deleted.

README.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,25 @@ Static blog powered by [Jekyll](https://jekyllrb.com/)
44

55
## Build locally
66

7+
Using Docker Compose:
8+
9+
```sh
10+
$ docker-compose up
11+
```
12+
13+
> Make sure you have [Docker Compose installed](https://docs.docker.com/compose/install/) to run it.
14+
15+
Using your local Ruby environment:
16+
717
```sh
8-
bundle install
9-
bundle exec jekyll serve
18+
$ bundle install
19+
$ bundle exec jekyll serve
1020
```
1121

22+
---
23+
24+
The blog is served at http://localhost:4000
25+
1226
## Content
1327

1428
Welcome to our official technology blog. The idea is to share with the Community about our technology challenges. A blog post in an engineering blog should show readers what in-house engineering teams are actually working on. Engineering posts help peers understand what a particular individual or team within a much larger organization actually works on, keeping sales and marketing to an absolute minimum. These posts tell us about an engineering team’s philosophy as well as their stack.
@@ -33,7 +47,7 @@ Do you have an interesting topic to share but it's not technical? we have a plac
3347
* Create a file inside folder [_posts/](_posts/) with the following naming convention: `yyyy-mm-dd-title-with-spaces.md`
3448
* Add images that you'll use in this post to folder [assets/images/post/](assets/images/post/)
3549
* Ensure your header is correct. Use existing posts as an example, both for the header and the content.
36-
* Ensure you run `bundle install && bundle exec jekyll serve` locally and double check everything is fine at http://127.0.0.1:4000/ before submitting a PR to branch `main`.
50+
* Ensure you [run it locally](#build-locally) and double check everything is fine in your browser before submitting a PR to branch `main`.
3751

3852
## Linting your posts
3953

@@ -43,7 +57,7 @@ The linting tool is [Vale](https://github.com/errata-ai/vale) and you can run it
4357

4458

4559
```bash
46-
vale --glob='*.md' --minAlertLevel=warning .
60+
$ vale --glob='*.md' --minAlertLevel=warning .
4761
```
4862

4963
For more information, check the [usage docs](https://docs.errata.ai/vale/cli)

_config.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,11 @@ footer:
9090
# - vendor/ruby/
9191
include:
9292
- _pages
93-
- vendor/bundle
9493

9594
sass:
9695
style: compressed
9796
load_paths:
98-
- ./vendor/bundle/ruby/*/gems/bootstrap-5.0.0/assets/stylesheets
97+
- ./assets/css/vendor/bootstrap
9998

10099
# Defaults
101100
defaults:

_plugins/jekyll_asset_pipeline.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
require 'jekyll_asset_pipeline'
22
require 'fileutils'
3+
require 'bootstrap'
34

45
def copy_files(source, destination)
56
puts %(copy_files.rb: Copying files from "#{source}" to "#{destination}")
@@ -8,5 +9,6 @@ def copy_files(source, destination)
89
end
910

1011
Jekyll::Hooks.register :site, :after_init do |jekyll|
11-
copy_files 'vendor/bundle/ruby/*/gems/bootstrap-5.0.0/assets/javascripts', 'assets/js/vendor/bootstrap'
12+
copy_files "#{Bootstrap.gem_path}/assets/javascripts", "assets/js/vendor/bootstrap"
13+
copy_files "#{Bootstrap.gem_path}/assets/stylesheets", "assets/css/vendor/bootstrap"
1214
end

docker-compose.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: '2'
2+
3+
services:
4+
jekyll:
5+
image: jekyll/jekyll:latest
6+
command: jekyll serve --watch --force_polling --verbose
7+
ports:
8+
- 4000:4000
9+
volumes:
10+
- .:/srv/jekyll

0 commit comments

Comments
 (0)