Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
Add docker-compose support (#6890)
Browse files Browse the repository at this point in the history
* Add docker-compose support

* Fix markdown style violations

* Added additional description of docker setup

* Update README.md

Co-Authored-By: hguthrie <hguthrie@users.noreply.github.com>

* Add further instruction of the docker setup

* Fix lint errors

* Remove trailing spaces

* Remove wrong quotes

Co-authored-by: hguthrie <hguthrie@users.noreply.github.com>
  • Loading branch information
cmuench and hguthrie authored Mar 20, 2020
1 parent 5595adc commit a7df034
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ This site is built by [Jekyll](https://jekyllrb.com/), which is an open-source t
You can build the site locally in the following ways:

- [Installing the project dependencies locally](#build-locally) (Mac, Linux)
- [Using Docker (docker-compose)](#docker-docker-compose) (Mac, Linux, Windows)
- [Using a Vagrant virtual machine](https://github.com/magento-devdocs/vagrant-for-magento-devdocs) (Mac, Linux, Windows)
- [Build DevDocs in Windows](https://github.com/magento/devdocs/wiki/Build-DevDocs-in-Windows) (Windows 7 & 10)
- [Building older versions of the documentation](#building-old-versions)
Expand Down Expand Up @@ -141,6 +142,31 @@ exclude:
>rake preview:all
>```
## Docker (docker-compose)
Docker provides a quick and easy way to build and preview the documentation. You do not need to install Ruby dependencies manually. This Docker solution launches Jekyll inside the container in `watch` mode.
ruby dependency manually. The provided setup starts Jekyll inside the container in watch mode.
Every change of a markdown file will automatically trigger a rebuild of the documentation.
1. Install [Docker](https://www.docker.com/get-started). If you have Docker installed, make sure Docker is running.
1. Build and start the Docker environment.
```bash
docker-compose up
```
1. Use the server address URL provided by the system response.
For example:
```terminal
jekyll_1 | Server address: http://127.0.0.1:4000/
jekyll_1 | Server running... press ctrl-c to stop.
```
1. Press `Ctrl+C` in the serve terminal to stop the server.
## Building old versions
The published website contains documentation for the latest Magento releases only. For cases, when you need to view the content as it was for an earlier release, we created [tags](https://github.com/magento/devdocs/tags) in this repository. Typically, they point at the commit when the release notes were finalized and published.
Expand Down
11 changes: 11 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: '3.6'

services:
jekyll:
image: jekyll/jekyll:latest
command: jekyll serve --watch --incremental --open-url --livereload
ports:
- 4000:4000
- 35729:35729
volumes:
- .:/srv/jekyll

0 comments on commit a7df034

Please sign in to comment.