diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..22ca19c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +FROM ruby:2.7.0 + +WORKDIR /srv/jekyll + +COPY . . + +RUN bundle config path vendor/bundle diff --git a/_bin/install b/_bin/install new file mode 100755 index 0000000..ca81d55 --- /dev/null +++ b/_bin/install @@ -0,0 +1,5 @@ +#!/usr/bin/env sh + +rm -rf ./vendor +docker-compose up -d --build +docker-compose exec app bundle install \ No newline at end of file diff --git a/_bin/serve b/_bin/serve new file mode 100755 index 0000000..5133119 --- /dev/null +++ b/_bin/serve @@ -0,0 +1,6 @@ +#!/usr/bin/env sh + +docker-compose exec app \ + bundle exec jekyll server \ + --host 0.0.0.0 \ + --port 4000 \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..2b1d653 --- /dev/null +++ b/docker-compose.yml @@ -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 + \ No newline at end of file