Skip to content

Commit 526ffa7

Browse files
committed
Add information about build only docker-compose file
1 parent 7e8e3f4 commit 526ffa7

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ Make sure you are in the root directory of the cloned repository.
2222
You need to have [Docker Engine](https://docs.docker.com/engine/) and [Docker Compose](https://docs.docker.com/compose/) installed on your machine.
2323
Under macOS (Intel or Apple silicon), instead of installing [Docker Desktop](https://docs.docker.com/desktop/) you can also use [HomeBrew](https://brew.sh/) with [Colima](https://github.com/abiosoft/colima): `brew install colima docker docker-compose`.
2424
UID and GID environment variables are needed to avoid docker from writing files as root in your directory.
25+
By default, docker-compose will use the file docker-compose.yml which will build the website and serve it on 0.0.0.0:4000 .
26+
If you just need to build the website, add ```-f docker-compose_build-only.yml```
2527

2628
```
2729
env UID="$(id -u)" GID="$(id -g)" docker-compose up

docker-compose_build-only.yml

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: '2'
2+
3+
services:
4+
jekyll:
5+
user: "${UID}:${GID}"
6+
build: .
7+
command: sh -c "chown $UID / && bundle exec jekyll build"
8+
volumes:
9+
- .:/srv/jekyll

0 commit comments

Comments
 (0)