Dockerfile (#4550)

* add init dockerfile

* add dockerfile documentation

* gitignore gemfile.lock

* improve Dockerfile

* add docker-compose file

* change readme to use docker-compose

* improve readme

* Fix readme - Debian != Windows

* Small wording improvement

* copy contents into dockerfile

To be able to run it without a volume (but with `docker-compose up` who
would do that :) )
This commit is contained in:
bux578 2016-10-16 10:48:14 +02:00 committed by GitHub
parent 1f0f9f7ee1
commit 846b7f26f7
6 changed files with 74 additions and 157 deletions

1
docs/.dockerignore Normal file
View File

@ -0,0 +1 @@
src

2
docs/.gitignore vendored
View File

@ -18,3 +18,5 @@ addons
CNAME
tools/temp
Gemfile.lock

14
docs/Dockerfile Normal file
View File

@ -0,0 +1,14 @@
# Build:
# docker build -t ace3mod/jekyll .
#
# Run:
# docker run -p 4000:4000 -it ace3mod/jekyll
FROM starefossen/github-pages:latest
MAINTAINER bux
COPY . /usr/src/app
VOLUME "/usr/src/app"
CMD ["jekyll", "serve", "--future", "--incremental", "--config", "_config_dev.yml", "-H", "0.0.0.0", "-P", "4000"]

View File

@ -1,135 +0,0 @@
GEM
remote: http://rubygems.org/
specs:
RedCloth (4.2.9)
RedCloth (4.2.9-x86-mingw32)
activesupport (4.2.5.2)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.3.8)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.10.0)
colorator (0.1)
ethon (0.8.1)
ffi (>= 1.3.0)
execjs (2.6.0)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
ffi (1.9.10)
ffi (1.9.10-x86-mingw32)
gemoji (2.1.0)
github-pages (52)
RedCloth (= 4.2.9)
github-pages-health-check (= 1.0.1)
jekyll (= 3.0.3)
jekyll-coffeescript (= 1.0.1)
jekyll-feed (= 0.4.0)
jekyll-gist (= 1.4.0)
jekyll-mentions (= 1.0.1)
jekyll-paginate (= 1.1.0)
jekyll-redirect-from (= 0.9.1)
jekyll-sass-converter (= 1.3.0)
jekyll-seo-tag (= 1.3.1)
jekyll-sitemap (= 0.10.0)
jekyll-textile-converter (= 0.1.0)
jemoji (= 0.5.1)
kramdown (= 1.9.0)
liquid (= 3.0.6)
mercenary (~> 0.3)
rdiscount (= 2.1.8)
redcarpet (= 3.3.3)
rouge (= 1.10.1)
terminal-table (~> 1.4)
github-pages-health-check (1.0.1)
addressable (~> 2.3)
net-dns (~> 0.8)
octokit (~> 4.0)
public_suffix (~> 1.4)
typhoeus (~> 0.7)
html-pipeline (2.3.0)
activesupport (>= 2, < 5)
nokogiri (>= 1.4)
i18n (0.7.0)
jekyll (3.0.3)
colorator (~> 0.1)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 1.1)
kramdown (~> 1.3)
liquid (~> 3.0)
mercenary (~> 0.3.3)
rouge (~> 1.7)
safe_yaml (~> 1.0)
jekyll-coffeescript (1.0.1)
coffee-script (~> 2.2)
jekyll-feed (0.4.0)
jekyll-gist (1.4.0)
octokit (~> 4.2)
jekyll-mentions (1.0.1)
html-pipeline (~> 2.3)
jekyll (~> 3.0)
jekyll-paginate (1.1.0)
jekyll-redirect-from (0.9.1)
jekyll (>= 2.0)
jekyll-sass-converter (1.3.0)
sass (~> 3.2)
jekyll-seo-tag (1.3.1)
jekyll (~> 3.0)
jekyll-sitemap (0.10.0)
jekyll-textile-converter (0.1.0)
RedCloth (~> 4.0)
jekyll-watch (1.3.1)
listen (~> 3.0)
jemoji (0.5.1)
gemoji (~> 2.0)
html-pipeline (~> 2.2)
jekyll (>= 2.0)
json (1.8.3)
kramdown (1.9.0)
liquid (3.0.6)
listen (3.0.6)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9.7)
mercenary (0.3.5)
mini_portile2 (2.0.0)
minitest (5.8.4)
multipart-post (2.0.0)
net-dns (0.8.0)
nokogiri (1.6.7.2)
mini_portile2 (~> 2.0.0.rc2)
nokogiri (1.6.7.2-x86-mingw32)
mini_portile2 (~> 2.0.0.rc2)
octokit (4.2.0)
sawyer (~> 0.6.0, >= 0.5.3)
public_suffix (1.5.3)
rb-fsevent (0.9.7)
rb-inotify (0.9.7)
ffi (>= 0.5.0)
rdiscount (2.1.8)
redcarpet (3.3.3)
rouge (1.10.1)
safe_yaml (1.0.4)
sass (3.4.21)
sawyer (0.6.0)
addressable (~> 2.3.5)
faraday (~> 0.8, < 0.10)
terminal-table (1.5.2)
thread_safe (0.3.5)
typhoeus (0.8.0)
ethon (>= 0.8.0)
tzinfo (1.2.2)
thread_safe (~> 0.1)
PLATFORMS
ruby
x86-mingw32
DEPENDENCIES
github-pages
BUNDLED WITH
1.12.5

View File

@ -1,10 +1,52 @@
# Source of http://ace3mod.com/
## Setting up the development environment
## Updating compiled JavaScript and CSS files
### Installing prerequisites
- Install [Node.js](https://nodejs.org/download/)
- Open Command Prompt and navigate to `src` directory
```
cd <ACE3_directory>/docs/src
```
#### Windows (CMD)
- Install Node packages
```
npm install
```
_On Bash on Ubuntu on Windows also install `nodejs-legacy` in case of errors._
- Update files
```
grunt
```
## Setting up the Jekyll environment
### Using Docker
We include files for [Docker](https://www.docker.com/) to run Jekyll in a separate container. This allows you to not having to install anything apart from Docker on your computer.
#### Running the Dockerfile
- Install [Docker](https://www.docker.com/)
- cd into the `/docs/` directory
- Open Command Prompt and navigate to this directory
```
cd <ACE3_directory>/docs
```
- Build and run the container
```
docker-compose up
```
- Navigate to [http://localhost:4000](http://localhost:4000)
### Manually
#### Installing prerequisites
##### Windows (CMD)
- Install [Ruby 2.0.0-p648 (x64)](http://rubyinstaller.org/downloads/)
- Install [Ruby DevKit for 2.0 (x64)](http://rubyinstaller.org/downloads/)
@ -23,6 +65,7 @@
bundle install
```
#### Debian / Bash on Ubuntu on Windows
- Open Bash and navigate to this directory
@ -62,7 +105,7 @@
find ~/.bundle/cache -type d -exec chmod 0755 {} +
```
### Running
#### Running
- Run Jekyll through bundler
```
@ -72,21 +115,3 @@
- Navigate to http://localhost:4000
### Updating compiled JavaScript and CSS files
- Install [Node.js](https://nodejs.org/download/)
- Open Command Prompt and navigate to `src` directory
```
cd <ACE3_directory>/docs/src
```
- Install Node packages
```
npm install
```
_On Bash on Ubuntu on Windows also install `nodejs-legacy` in case of errors._
- Update files
```
grunt
```

10
docs/docker-compose.yml Normal file
View File

@ -0,0 +1,10 @@
version: '2'
services:
docs:
build: .
restart: always
ports:
- "4000:4000"
volumes:
- ./:/usr/src/app