Skip to content

Commit

Permalink
Merge pull request #130 from newtheatre/feature/better-docker
Browse files Browse the repository at this point in the history
mo' better docker
  • Loading branch information
samozzy authored Dec 1, 2024
2 parents cf2c246 + f53efea commit 6b2098d
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM ruby:2.7.0

WORKDIR /srv/jekyll

COPY . .

RUN bundle config path vendor/bundle
5 changes: 5 additions & 0 deletions _bin/install
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env sh

rm -rf ./vendor
docker-compose up -d --build
docker-compose exec app bundle install
6 changes: 6 additions & 0 deletions _bin/serve
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env sh

docker-compose exec app \
bundle exec jekyll server \
--host 0.0.0.0 \
--port 4000
22 changes: 22 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: '3'

services:
app:
platform: linux/x86_64
build:
context: .
dockerfile: Dockerfile
volumes:
- "./:/srv/jekyll"
ports:
- "4000:4000"
networks:
- website-network
entrypoint: tail -f /dev/null
environment:
EXECJS_RUNTIME: Disabled

networks:
website-network:
driver: bridge

0 comments on commit 6b2098d

Please sign in to comment.