Skip to content

Commit

Permalink
Ease development using docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
hartwork committed Jan 28, 2019
1 parent 2286a31 commit 5991a59
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Dockerfile
@@ -0,0 +1,27 @@
# Copyright (C) 2019 Sebastian Pipping <sebastian@pipping.org>
# Licensed under the MIT license

FROM ruby:stretch

ENV LC_ALL=C.UTF-8
ENV LANG=en_US.UTF-8
ENV LANGUAGE=en_US.UTF-8

COPY \
css/ \
js/ \
lang/ \
_layouts/ \
script/ \
spec/ \
\
_config_local.yml \
_config.yml \
Gemfile \
index.md \
\
/app/

WORKDIR /app/
RUN bundle install
CMD ["bundle", "exec", "jekyll", "serve", "--host", "0.0.0.0"]
10 changes: 10 additions & 0 deletions README.md
Expand Up @@ -22,3 +22,13 @@ This is the site at http://semver.org/ that describes the Semantic Versioning sp
bundle exec jekyll serve
```
4. Open http://localhost:4000.

## Running locally with docker-compose

If you have [docker-compose](https://docs.docker.com/compose/) installed:

1. Build Docker image and start container instance:
```
docker-compose up
```
2. Open http://localhost:4000.
12 changes: 12 additions & 0 deletions docker-compose.yml
@@ -0,0 +1,12 @@
# Copyright (C) 2019 Sebastian Pipping <sebastian@pipping.org>
# Licensed under the MIT license

version: '3'

services:
semver-org:
build: .
ports:
- "127.0.0.1:4000:4000"
volumes:
- .:/app/

0 comments on commit 5991a59

Please sign in to comment.