Skip to content

Commit

Permalink
dockerise jekyll
Browse files Browse the repository at this point in the history
  • Loading branch information
rdoh committed May 16, 2018
1 parent e286dcd commit c87cec3
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 38 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ _site
Gemfile.lock
.idea
internetfreedomhack-website.iml
vendor
45 changes: 7 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,41 +6,10 @@ Continuously deployed via Netlify.
Based on [Type Theme](https://rohanchandra.github.io/type-theme/)

---
## Development setup (macOS)
1. Install Ruby environment manager
```shell
brew install rbenv
```
2. Find the latest version
```shell
rbenv install —list
```
3. Install one of the Ruby versions
```shell
rbenv install 2.5.0
```
4. Run the following command and then follow instructions
```shell
rbenv init
```
5. Restart the terminal
6. Set your local ruby to the version you installed in step 3
```shell
rbenv local 2.5.0
```
7. Run the install bundler
```shell
gem install bundler
```
8. Install the dependencies listed in the Gemfile
```shell
bundler install
```
9. Start the server
```shell
jekyll serve
```
If this doesn't work try
```shell
bundle exec jekyll serve
```
## Development setup (docker-compose on macOS)

1. Install Docker and docker-compose
2. Run `docker-compose up -d`
3. Website should be available at [http://localhost:4000](http://localhost:4000).

If it doesn't start successfully, check the logs with `docker logs internetfreedomhack-website_site_1`.
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ plugins:
exclude:
- Gemfile
- Gemfile.lock
- vendor

# PLUGIN SETTINGS
maps:
Expand Down
13 changes: 13 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: "3"
services:
site:
command: jekyll serve
image: jekyll/jekyll:latest
volumes:
- $PWD:/srv/jekyll
- $PWD/vendor/bundle:/usr/local/bundle
ports:
- 4000:4000
- 35729:35729
- 3000:3000
- 80:4000

0 comments on commit c87cec3

Please sign in to comment.