diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..5df1b9b --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +.sass-cache diff --git a/README.md b/README.md index 639679c..83b48ad 100644 --- a/README.md +++ b/README.md @@ -2,35 +2,26 @@ [![Build Status](https://travis-ci.org/saglacio/saglac.io.svg?branch=master)](https://travis-ci.org/saglacio/saglac.io) -Website for [saglac.io](https://saglac.io). This is a basic [Jekyll](https://jekyllrb.com/) website :rocket: +The meetup website for [saglac.io](https://saglac.io) running on [Jekyll](https://jekyllrb.com/) :rocket: -## Prerequisites +## Development -On macOS, use [`brew`](https://brew.sh/index_fr) to install [`rbenv`](https://github.com/rbenv/rbenv). +### Requirements -```bash -brew install rbenv -# Set up rbenv in your shell. -rbenv init -# Install the ruby version needed for this project -rbenv install -``` +- [docker](https://www.docker.com) and [docker-compose](https://docs.docker.com/compose/) -Restart your shell to make sure everything is correctly loaded. - -## Development +### Getting started Run: ```bash -gem install bundle -bundle install -bundle exec jekyll serve --watch +docker-compose up -d +docker-compose logs -f ``` Visit http://0.0.0.0:4000 ... :boom:! -## Add an event +### Add an event Everything is in the `_data` directory, just send a [pull-request](https://github.com/saglacio/saglac.io/pulls)! diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..daa984c --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,12 @@ +version: '3' + +services: + jekyll: + build: + context: . + dockerfile: docker/ruby/Dockerfile + command: ["bundle", "exec", "jekyll", "server", "--force_polling", "-H", "0.0.0.0", "-P", "4000"] + ports: + - 4000:4000 + volumes: + - "./:/app" diff --git a/docker/ruby/Dockerfile b/docker/ruby/Dockerfile new file mode 100644 index 0000000..3702eaa --- /dev/null +++ b/docker/ruby/Dockerfile @@ -0,0 +1,7 @@ +FROM ruby:2.4.2 + +WORKDIR /app + +RUN gem install bundler +ADD ./Gemfile* ./ +RUN bundle install