Skip to content

Commit

Permalink
Add docker setup
Browse files Browse the repository at this point in the history
Closes #403
  • Loading branch information
solnic committed Feb 9, 2024
1 parent 9ff2ff7 commit 77dc27a
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 10,252 deletions.
18 changes: 18 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Start with a Ruby base image
FROM ruby:2.6

# Install Node.js
RUN curl -sL https://deb.nodesource.com/setup_12.x | bash -
RUN apt-get install -y nodejs

# Set working directory
WORKDIR /app

# Copy project files
COPY Gemfile Gemfile.lock package.json package-lock.json ./

# Update rubygems
RUN gem update --system 3.2.3

# Install bundler that works with the current version of Ruby
RUN gem install bundler:2.4.22 --no-document
17 changes: 5 additions & 12 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ GEM
tzinfo (~> 1.1)
addressable (2.8.1)
public_suffix (>= 2.0.2, < 6.0)
async (2.3.1)
console (~> 1.10)
io-event (~> 1.1)
timers (~> 4.1)
backports (3.17.0)
better_errors (2.5.1)
coderay (>= 1.0.0)
Expand All @@ -40,8 +36,6 @@ GEM
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.1.6)
console (1.16.2)
fiber-local
contracts (0.16.0)
crass (1.0.6)
debug_inspector (0.0.3)
Expand Down Expand Up @@ -80,18 +74,18 @@ GEM
execjs (2.7.0)
fastimage (2.1.7)
ffi (1.15.5)
fiber-local (1.0.0)
haml (5.1.2)
temple (>= 0.8.0)
tilt
hamster (3.0.0)
concurrent-ruby (~> 1.0)
hashie (3.6.0)
hashugar (1.0.1)
html-proofer (5.0.3)
html-proofer (4.4.3)
addressable (~> 2.3)
async (~> 2.1)
mercenary (~> 0.3)
nokogiri (~> 1.13)
parallel (~> 1.10)
rainbow (~> 3.0)
typhoeus (~> 1.3)
yell (~> 2.0)
Expand All @@ -100,7 +94,6 @@ GEM
i18n (0.9.5)
concurrent-ruby (~> 1.0)
ice_nine (0.11.2)
io-event (1.1.4)
jbuilder (2.9.1)
activesupport (>= 4.2.0)
kramdown (1.17.0)
Expand All @@ -109,6 +102,7 @@ GEM
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
memoist (0.16.2)
mercenary (0.4.0)
middleman (5.0.0.rc.1)
coffee-script (~> 2.2)
haml (>= 4.0.5)
Expand Down Expand Up @@ -204,7 +198,6 @@ GEM
tilt-jbuilder (0.7.1)
jbuilder
tilt (>= 1.3.0, < 3)
timers (4.3.5)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (1.2.6)
Expand Down Expand Up @@ -240,4 +233,4 @@ DEPENDENCIES
tilt-jbuilder

BUNDLED WITH
2.2.33
2.4.22
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@

This is the [Middleman](https://middlemanapp.com)-generated [dry-rb.org website](http://dry-rb.org/).

## Getting started with Docker

Simply start development via docker-compose:

```
docker compose up development
```

WARNING: this *takes a while* because it downloads docsite repos for all the dry-rb gems and all their versions. See container logs to watch progress.

## Getting started

Install the gem and NPM dependencies:
Expand Down
15 changes: 15 additions & 0 deletions bin/docker
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

set -e

# Install gems
bundle check || bundle install --jobs 4 --retry 3

# Install node modules
npm install --prefer-offline --no-audit

# Symlink docsites from dry-rb repos
bundle exec rake projects:symlink

# Start middleman server
bundle exec middleman server --verbose
14 changes: 14 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: "3"

services:
development:
build: .
entrypoint: bin/docker
volumes:
- .:/app
- bundle:/usr/local/bundle
ports:
- "4567:4567"

volumes:
bundle:
Loading

0 comments on commit 77dc27a

Please sign in to comment.