Skip to content

Commit

Permalink
Setup docker compose
Browse files Browse the repository at this point in the history
This is required for this version of Sassc on M1 Macs:
sass/sassc-ruby#218
  • Loading branch information
ncjones committed Jan 14, 2022
1 parent 1c88281 commit 8c6b9d2
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
COMPOSE_FILE=docker-compose.yml:docker-compose-dev.yml
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,19 @@ bundle exec jekyll serve --livereload
```

Preview the site at http://127.0.0.1:4000.


## Local Docker Usage

Install Dependencies:

```
docker compose run script bundle install
```


Run the Jekyll server:

```
docker compose up
```
10 changes: 10 additions & 0 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: "3"

services:
app:
volumes: [ bundle:/usr/local/bundle ]
script:
volumes: [ bundle:/usr/local/bundle ]

volumes:
bundle:
21 changes: 21 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: "3"

services:
app:
image: ruby:2.7
working_dir: /work
volumes: [ ".:/work" ]
command: "bundle exec jekyll serve --livereload --host=0.0.0.0"
ports: [ "4000:4000" ]
script:
image: ruby:2.7
working_dir: /work
volumes: [ ".:/work" ]
stop_signal: SIGKILL
command:
- bash
- -c
- |
echo "
To execute a script, run:
docker-compose run script {command}"

0 comments on commit 8c6b9d2

Please sign in to comment.