diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..a2bf38a --- /dev/null +++ b/.dockerignore @@ -0,0 +1,47 @@ +# Build output +_site/ +bin/ +*.html +*.pdf +*.epub + +# Dependencies +node_modules/ +.gem/ +vendor/ + +# Git +.git/ +.gitignore + +# Editor/IDE +.vscode/ +.idea/ +*.swp +*.swo +*~ + +# OS +.DS_Store +Thumbs.db + +# Temporary files +*.tmp +*.temp +/tmp + +# Logs +*.log +npm-debug.log* + +# Docker +Dockerfile* +docker-compose* +.dockerignore + +# Development +TODO +ATMP-validation-flow.png +OP_RETURN.ipynb +exercise_tutorial-extended_class.ipynb +favicon.ico \ No newline at end of file diff --git a/.github/actions/setup-build/action.yml b/.github/actions/setup-build/action.yml new file mode 100644 index 0000000..dd8d992 --- /dev/null +++ b/.github/actions/setup-build/action.yml @@ -0,0 +1,22 @@ +name: 'Setup Build Environment' +description: 'Set up Ruby, Node.js, and dependencies for Jekyll site building' + +runs: + using: 'composite' + steps: + - name: Install Ruby and Jekyll + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.3.8' + bundler-cache: true + cache-version: 1 + - name: Setup Node.JS 22 + uses: actions/setup-node@v4 + with: + node-version: 22 + - name: Install mermaid-cli + shell: bash + run: npm install -g @mermaid-js/mermaid-cli + - name: Install bundle dependencies + shell: bash + run: bundle \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index edd303f..acb55b9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,22 +17,10 @@ jobs: - name: Configure Pages id: pages uses: actions/configure-pages@v5 - - name: Install Ruby and Jekyll - uses: ruby/setup-ruby@v1 - with: - ruby-version: '3.2.2' - bundler-cache: true - cache-version: 0 - - name: Setup Node.JS 18 - uses: actions/setup-node@v4 - with: - node-version: 18 - - name: Install mermaid-cli - run: npm install -g @mermaid-js/mermaid-cli + - name: Setup Build Environment + uses: ./.github/actions/setup-build - name: Generate Site - run: | - bundle - make all + run: make all env: JEKYLL_ENV: production ADD_JEKYLL_ARGS: --baseurl "${{ steps.pages.outputs.base_path }}" diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 720174b..fa40858 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -25,22 +25,10 @@ jobs: - name: Configure Pages id: pages uses: actions/configure-pages@v5 - - name: Install Ruby and Jekyll - uses: ruby/setup-ruby@v1 - with: - ruby-version: '3.2.2' - bundler-cache: true - cache-version: 0 - - name: Setup Node.JS 18 - uses: actions/setup-node@v4 - with: - node-version: 18 - - name: Install mermaid-cli - run: npm install -g @mermaid-js/mermaid-cli + - name: Setup Build Environment + uses: ./.github/actions/setup-build - name: Generate Site - run: | - bundle - make publish + run: make publish env: JEKYLL_ENV: production ADD_JEKYLL_ARGS: --baseurl "${{ steps.pages.outputs.base_path }}" diff --git a/Containerfile b/Containerfile.old similarity index 100% rename from Containerfile rename to Containerfile.old diff --git a/Dockerfile b/Dockerfile index dadca16..90a5b5e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,41 +1,34 @@ -FROM ruby:3.2.2-slim-bookworm - -RUN apt update && \ - apt --yes upgrade && \ - apt --yes install build-essential curl procps git \ - fonts-liberation libasound2 \ - libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 \ - libfontconfig1 libgbm1 libgcc1 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 \ - libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 \ - libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 \ - --no-install-recommends && \ - rm -rf /var/lib/apt/lists/* - -ARG UID=1000 -ARG GID=1000 - -WORKDIR /srv/ -COPY Gemfile /srv/Gemfile - -RUN groupadd -g ${GID} docs && \ - useradd -m -u ${UID} -g docs -s /bin/bash docs -RUN chown -R docs:docs /srv/ -USER docs - -RUN bash -l -c "echo 'export GEM_HOME=${HOME}/.gem' >> ${HOME}/.bashrc \ - && echo 'export GEM_PATH=${HOME}/.gem' >> ${HOME}/.bashrc \ - && source ~/.bashrc \ - && bundle config set --local path ${HOME}/.gem \ - && bundle install" - -RUN bash -l -c "curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash \ - && export NVM_DIR=\"\$([ -z \"${XDG_CONFIG_HOME-}\" ] && printf %s \"${HOME}/.nvm\" || printf %s \"${XDG_CONFIG_HOME}/nvm\")\" \ - && [ -s \"\$NVM_DIR/nvm.sh\" ] && \\. \"\$NVM_DIR/nvm.sh\" \ - && echo 'export PATH=${PATH}:/srv/node_modules/.bin' >> ${HOME}/.bashrc \ - && source ~/.bashrc \ - && nvm install node \ - && npm install @mermaid-js/mermaid-cli" - -ENV LANG C.UTF-8 -ENV LC_ALL C.UTF-8 -ENTRYPOINT ["bash", "-l"] +FROM docker.io/library/ruby:3.3.8-alpine + +# Install system dependencies +RUN apk add --no-cache \ + build-base \ + git \ + nodejs \ + npm \ + chromium \ + make + +# Set chromium path for puppeteer (needed for mermaid diagrams) +ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium + +# Install latest bundler version +RUN gem install bundler + +# Install mermaid-cli globally +RUN npm install -g @mermaid-js/mermaid-cli + +WORKDIR /srv + +# Copy dependency files first for better caching +COPY Gemfile Gemfile.lock package*.json ./ + +# Install dependencies +RUN bundle install && npm install + +# Ensure bundle bin is in PATH +ENV PATH="/usr/local/bundle/bin:$PATH" + +EXPOSE 4000 + +CMD ["sh", "-c", "bundle install && bundle exec jekyll serve --host 0.0.0.0 --future --drafts --unpublished --incremental --force_polling"] diff --git a/Gemfile b/Gemfile index d361692..70b781e 100644 --- a/Gemfile +++ b/Gemfile @@ -1,37 +1,38 @@ source 'https://rubygems.org' -## If you update the version here, also update it in .travis.yml, .ruby-version, -## and README.md. Then push your branch and make sure Travis supports that -## version. -ruby '3.2.2' +## If you update the version here, also update it in Docker and GitHub Actions +ruby '3.3.8' -gem "asciidoctor", "~>2.0.20" -gem "rouge" +gem "asciidoctor", "~>2.0.23" +gem "rouge", "~> 4.4" +gem "csv", "~> 3.3" +gem "base64", "~> 0.2" ## If you add a new Gem below, run `bundle install` to install it. group :development do - gem "jekyll", "~> 4.3.2" - gem "just-the-docs" - gem 'jekyll-redirect-from' + gem "jekyll", "~> 4.3.4" + gem "just-the-docs", "~> 0.10" + gem 'jekyll-redirect-from', '~> 0.16' # Lock `http_parser.rb` gem to `v0.6.x` on JRuby builds since newer versions of the gem # do not have a Java counterpart. #gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby] end group :jekyll_plugins do - gem "asciidoctor-diagram" - gem "jekyll-feed", "~> 0.12" - gem "jekyll-asciidoc", "~> 3.0.0" + gem "asciidoctor-diagram", "~> 2.3" + gem "jekyll-feed", "~> 0.17" + gem "jekyll-asciidoc", "~> 3.0.1" end group :asciidoc_plugins do - gem "asciidoctor-epub3" - gem "asciidoctor-pdf" + gem "asciidoctor-epub3", "~> 2.1" + gem "asciidoctor-pdf", "~> 2.3" + gem "rubyzip", "~> 2.3.0" end group :testing do - gem 'html-proofer' - gem 'mdl' - gem 'json-schema' - gem 'toml' + gem 'html-proofer', '~> 5.0' + gem 'mdl', '~> 0.13' + gem 'json-schema', '~> 5.0' + gem 'toml', '~> 0.3' end diff --git a/Gemfile.lock b/Gemfile.lock index 89c0d80..6dc96d5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,62 +1,101 @@ GEM remote: https://rubygems.org/ specs: - Ascii85 (1.1.0) - addressable (2.8.5) - public_suffix (>= 2.0.2, < 6.0) - afm (0.2.2) - asciidoctor (2.0.20) - asciidoctor-diagram (2.2.14) + Ascii85 (2.0.1) + addressable (2.8.7) + public_suffix (>= 2.0.2, < 7.0) + afm (1.0.0) + asciidoctor (2.0.23) + asciidoctor-diagram (2.3.2) asciidoctor (>= 1.5.7, < 3.x) asciidoctor-diagram-ditaamini (~> 1.0) asciidoctor-diagram-plantuml (~> 1.2021) rexml + asciidoctor-diagram-batik (1.17) asciidoctor-diagram-ditaamini (1.0.3) - asciidoctor-diagram-plantuml (1.2023.12) - asciidoctor-epub3 (1.5.1) - asciidoctor (>= 1.5.6, < 3.0.0) + asciidoctor-diagram-plantuml (1.2025.3) + asciidoctor-diagram-batik (~> 1.17) + asciidoctor-epub3 (2.3.0) + asciidoctor (~> 2.0) gepub (~> 1.0.0) mime-types (~> 3.0) - asciidoctor-pdf (2.3.9) + sass + asciidoctor-pdf (2.3.19) asciidoctor (~> 2.0) concurrent-ruby (~> 1.1) matrix (~> 0.4) prawn (~> 2.4.0) prawn-icon (~> 3.0.0) - prawn-svg (~> 0.32.0) + prawn-svg (~> 0.34.0) prawn-table (~> 0.2.0) prawn-templates (~> 0.1.0) treetop (~> 1.6.0) - async (2.6.5) - console (~> 1.10) + ttfunk (~> 1.7.0) + async (2.28.1) + console (~> 1.29) fiber-annotation - io-event (~> 1.1) - timers (~> 4.1) - chef-utils (18.3.0) + io-event (~> 1.11) + metrics (~> 0.12) + traces (~> 0.18) + base64 (0.3.0) + bigdecimal (3.2.2) + chef-utils (18.8.11) concurrent-ruby colorator (1.1.0) - concurrent-ruby (1.2.2) - console (1.23.2) + concurrent-ruby (1.3.5) + console (1.33.0) fiber-annotation - fiber-local - css_parser (1.16.0) + fiber-local (~> 1.1) + json + css_parser (1.21.1) addressable + csv (3.3.5) em-websocket (0.5.3) eventmachine (>= 0.12.9) http_parser.rb (~> 0) - ethon (0.16.0) + ethon (0.15.0) ffi (>= 1.15.0) eventmachine (1.2.7) - ffi (1.16.3) + ffi (1.17.2) + ffi (1.17.2-aarch64-linux-gnu) + ffi (1.17.2-aarch64-linux-musl) + ffi (1.17.2-arm-linux-gnu) + ffi (1.17.2-arm-linux-musl) + ffi (1.17.2-arm64-darwin) + ffi (1.17.2-x86_64-darwin) + ffi (1.17.2-x86_64-linux-gnu) + ffi (1.17.2-x86_64-linux-musl) fiber-annotation (0.2.0) - fiber-local (1.0.0) + fiber-local (1.1.0) + fiber-storage + fiber-storage (1.0.1) forwardable-extended (2.6.0) - gepub (1.0.15) + gepub (1.0.17) nokogiri (>= 1.8.2, < 2.0) rubyzip (> 1.1.1, < 2.4) - google-protobuf (3.25.1-x86_64-linux) + google-protobuf (4.32.0) + bigdecimal + rake (>= 13) + google-protobuf (4.32.0-aarch64-linux-gnu) + bigdecimal + rake (>= 13) + google-protobuf (4.32.0-aarch64-linux-musl) + bigdecimal + rake (>= 13) + google-protobuf (4.32.0-arm64-darwin) + bigdecimal + rake (>= 13) + google-protobuf (4.32.0-x86_64-darwin) + bigdecimal + rake (>= 13) + google-protobuf (4.32.0-x86_64-linux-gnu) + bigdecimal + rake (>= 13) + google-protobuf (4.32.0-x86_64-linux-musl) + bigdecimal + rake (>= 13) hashery (2.1.2) - html-proofer (5.0.8) + html-proofer (5.0.10) addressable (~> 2.3) async (~> 2.1) nokogiri (~> 1.13) @@ -66,10 +105,10 @@ GEM yell (~> 2.0) zeitwerk (~> 2.5) http_parser.rb (0.8.0) - i18n (1.14.1) + i18n (1.14.7) concurrent-ruby (~> 1.0) - io-event (1.3.3) - jekyll (4.3.2) + io-event (1.11.2) + jekyll (4.3.4) addressable (~> 2.4) colorator (~> 1.0) em-websocket (~> 0.5) @@ -94,28 +133,31 @@ GEM jekyll (>= 3.7, < 5.0) jekyll-redirect-from (0.16.0) jekyll (>= 3.3, < 5.0) - jekyll-sass-converter (3.0.0) - sass-embedded (~> 1.54) + jekyll-sass-converter (3.1.0) + sass-embedded (~> 1.75) jekyll-seo-tag (2.8.0) jekyll (>= 3.8, < 5.0) jekyll-watch (2.2.1) listen (~> 3.0) - json-schema (4.1.1) - addressable (>= 2.8) - just-the-docs (0.7.0) + json (2.13.2) + json-schema (5.2.2) + addressable (~> 2.8) + bigdecimal (~> 3.1) + just-the-docs (0.10.1) jekyll (>= 3.8.5) jekyll-include-cache jekyll-seo-tag (>= 2.0) rake (>= 12.3.1) - kramdown (2.4.0) - rexml + kramdown (2.5.1) + rexml (>= 3.3.9) kramdown-parser-gfm (1.1.0) kramdown (~> 2.0) liquid (4.0.4) - listen (3.8.0) + listen (3.9.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - matrix (0.4.2) + logger (1.7.0) + matrix (0.4.3) mdl (0.13.0) kramdown (~> 2.3) kramdown-parser-gfm (~> 1.1) @@ -123,23 +165,39 @@ GEM mixlib-config (>= 2.2.1, < 4) mixlib-shellout mercenary (0.4.0) - mime-types (3.5.1) - mime-types-data (~> 3.2015) - mime-types-data (3.2023.1003) + metrics (0.14.0) + mime-types (3.7.0) + logger + mime-types-data (~> 3.2025, >= 3.2025.0507) + mime-types-data (3.2025.0826) mixlib-cli (2.1.8) mixlib-config (3.0.27) tomlrb - mixlib-shellout (3.2.7) + mixlib-shellout (3.3.9) chef-utils - nokogiri (1.15.5-x86_64-linux) + nokogiri (1.18.9-aarch64-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.9-aarch64-linux-musl) + racc (~> 1.4) + nokogiri (1.18.9-arm-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.9-arm-linux-musl) + racc (~> 1.4) + nokogiri (1.18.9-arm64-darwin) + racc (~> 1.4) + nokogiri (1.18.9-x86_64-darwin) + racc (~> 1.4) + nokogiri (1.18.9-x86_64-linux-gnu) + racc (~> 1.4) + nokogiri (1.18.9-x86_64-linux-musl) racc (~> 1.4) parslet (2.0.0) pathutil (0.16.2) forwardable-extended (~> 2.6) pdf-core (0.9.0) - pdf-reader (2.11.0) - Ascii85 (~> 1.0) - afm (~> 0.2.1) + pdf-reader (2.15.0) + Ascii85 (>= 1.0, < 3.0, != 2.0.0) + afm (>= 0.2.1, < 2) hashery (~> 2.0) ruby-rc4 ttfunk @@ -149,8 +207,9 @@ GEM ttfunk (~> 1.7) prawn-icon (3.0.0) prawn (>= 1.1.0, < 3.0.0) - prawn-svg (0.32.0) + prawn-svg (0.34.2) css_parser (~> 1.6) + matrix (~> 0.4.2) prawn (>= 0.11.1, < 3) rexml (~> 3.2) prawn-table (0.2.2) @@ -158,57 +217,91 @@ GEM prawn-templates (0.1.2) pdf-reader (~> 2.0) prawn (~> 2.2) - public_suffix (5.0.4) - racc (1.7.3) + public_suffix (6.0.2) + racc (1.8.1) rainbow (3.1.1) - rake (13.1.0) + rake (13.3.0) rb-fsevent (0.11.2) - rb-inotify (0.10.1) + rb-inotify (0.11.1) ffi (~> 1.0) - rexml (3.2.6) - rouge (4.2.0) + rexml (3.4.2) + rouge (4.6.0) ruby-rc4 (0.1.5) rubyzip (2.3.2) safe_yaml (1.0.5) - sass-embedded (1.69.5-x86_64-linux-gnu) - google-protobuf (~> 3.23) + sass (3.7.4) + sass-listen (~> 4.0.0) + sass-embedded (1.91.0) + google-protobuf (~> 4.31) + rake (>= 13) + sass-embedded (1.91.0-aarch64-linux-gnu) + google-protobuf (~> 4.31) + sass-embedded (1.91.0-aarch64-linux-musl) + google-protobuf (~> 4.31) + sass-embedded (1.91.0-arm-linux-gnueabihf) + google-protobuf (~> 4.31) + sass-embedded (1.91.0-arm-linux-musleabihf) + google-protobuf (~> 4.31) + sass-embedded (1.91.0-arm64-darwin) + google-protobuf (~> 4.31) + sass-embedded (1.91.0-x86_64-darwin) + google-protobuf (~> 4.31) + sass-embedded (1.91.0-x86_64-linux-gnu) + google-protobuf (~> 4.31) + sass-embedded (1.91.0-x86_64-linux-musl) + google-protobuf (~> 4.31) + sass-listen (4.0.0) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) - timers (4.3.5) toml (0.3.0) parslet (>= 1.8.0, < 3.0.0) tomlrb (2.0.3) - treetop (1.6.12) + traces (0.18.1) + treetop (1.6.14) polyglot (~> 0.3) ttfunk (1.7.0) - typhoeus (1.4.1) - ethon (>= 0.9.0) - unicode-display_width (2.5.0) - webrick (1.8.1) + typhoeus (1.5.0) + ethon (>= 0.9.0, < 0.16.0) + unicode-display_width (2.6.0) + webrick (1.9.1) yell (2.2.2) - zeitwerk (2.6.12) + zeitwerk (2.7.3) PLATFORMS - x86_64-linux + aarch64-linux-gnu + aarch64-linux-musl + arm-linux-gnu + arm-linux-gnueabihf + arm-linux-musl + arm-linux-musleabihf + arm64-darwin + x86_64-darwin + x86_64-linux-gnu + x86_64-linux-musl DEPENDENCIES - asciidoctor (~> 2.0.20) - asciidoctor-diagram - asciidoctor-epub3 - asciidoctor-pdf - html-proofer - jekyll (~> 4.3.2) - jekyll-asciidoc (~> 3.0.0) - jekyll-feed (~> 0.12) - jekyll-redirect-from - json-schema - just-the-docs - mdl - rouge - toml + asciidoctor (~> 2.0.23) + asciidoctor-diagram (~> 2.3) + asciidoctor-epub3 (~> 2.1) + asciidoctor-pdf (~> 2.3) + base64 (~> 0.2) + csv (~> 3.3) + html-proofer (~> 5.0) + jekyll (~> 4.3.4) + jekyll-asciidoc (~> 3.0.1) + jekyll-feed (~> 0.17) + jekyll-redirect-from (~> 0.16) + json-schema (~> 5.0) + just-the-docs (~> 0.10) + mdl (~> 0.13) + rouge (~> 4.4) + rubyzip (~> 2.3.0) + toml (~> 0.3) RUBY VERSION - ruby 3.2.2p53 + ruby 3.3.8p144 BUNDLED WITH - 2.4.18 + 2.7.1 diff --git a/Makefile b/Makefile index e25ec02..92581ca 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,19 @@ production: clean all production-test export GIT_PAGER='_contrib/kill0' JEKYLL_FLAGS = --future --drafts --unpublished --incremental ## Needed for github actions to work properly -SHELL=/bin/bash +SHELL=/usr/bin/env bash + +## Docker targets +docker-dev: + docker-compose up dev + +docker-shell: + docker-compose run --rm shell + +docker-clean: + docker-compose down -v + docker system prune -f + clean: bundle exec jekyll clean diff --git a/README.adoc b/README.adoc index 0cfbfe6..6325fc6 100644 --- a/README.adoc +++ b/README.adoc @@ -2,5 +2,70 @@ This documentation is currently hosted at https://bitcoincore.academy[bitcoincore.academy] however this location may be subject to change in the future. -See https://github.com/chaincodelabs/onboarding-to-bitcoin-core/blob/master/asciidoc_workflow.adoc[asciidoc_workflow.adoc] -and https://github.com/chaincodelabs/onboarding-to-bitcoin-core/blob/master/jekyll_workflow.md[jekyll_workflow.md] for tips on contributing and instructions for running locally. +== Development + +=== Local Development with Docker + +The easiest way to serve the site locally is using Docker: + +[source,bash] +---- +docker compose up dev +---- + +This will: +- Build the development environment +- Install all dependencies (Ruby gems and Node.js packages) +- Start a Jekyll development server on port 4000 +- Mount the current directory for live reloading +- Use development environment settings + +The site will be available at http://localhost:4000 + +=== Makefile Commands + +The project includes several useful Makefile targets for development and deployment: + +==== Docker Commands +- `make docker-dev` - Start development server using Docker Compose +- `make docker-shell` - Open an interactive shell in the Docker container +- `make docker-clean` - Clean up Docker containers and system resources + +==== Build Commands +- `make build` - Build the Jekyll site into `_site` directory +- `make preview` - Build and serve the site locally with live reload +- `make clean` - Clean up generated files + +==== Testing and Quality +- `make test-before-build` - Run pre-build tests (Markdown linting) +- `make test-after-build` - Run post-build tests (link checking, duplicate anchors) +- `make all` - Complete build and test pipeline + +==== Output Formats +- `make html` - Generate single-page HTML version +- `make pdf` - Generate PDF version +- `make epub` - Generate EPUB version +- `make publish` - Full publish pipeline with all formats +- `make production` - Production build with all tests + +=== Development Workflow + +1. Local Development: Use `docker compose up dev` or `make docker-dev` to start the development server +2. Shell Access: Use `make docker-shell` to access the container for debugging or manual commands +3. Testing: Run `make all` before submitting changes to ensure everything builds and passes tests +4. Cleanup: Use `make docker-clean` to clean up containers and free disk space + +=== Dependencies + +The project uses: +- Jekyll for static site generation +- Asciidoctor for processing AsciiDoc files +- Mermaid CLI for diagram generation +- HTMLProofer for link checking +- Markdownlint for Markdown validation + +All dependencies are managed through the Docker container, so you don't need to install anything locally except Docker. + +=== Contributing + +See https://github.com/chaincodelabs/onboarding-to-bitcoin-core/blob/master/asciidoc_workflow.adoc[asciidoc_workflow.adoc] for detailed contributing guidelines and AsciiDoc formatting instructions. diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..5a8ba01 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,32 @@ +version: '3.8' + +services: + dev: + build: . + ports: + - "4000:4000" + volumes: + - .:/srv + - bundle_cache:/usr/local/bundle + - node_modules_cache:/srv/node_modules + environment: + - BUNDLE_PATH=/usr/local/bundle + - JEKYLL_ENV=development + - PATH=/srv/node_modules/.bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin + + shell: + build: . + volumes: + - .:/srv + - bundle_cache:/usr/local/bundle + - node_modules_cache:/srv/node_modules + environment: + - BUNDLE_PATH=/usr/local/bundle + - PATH=/srv/node_modules/.bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin + entrypoint: /bin/sh + profiles: + - tools + +volumes: + bundle_cache: + node_modules_cache: \ No newline at end of file