Skip to content

Commit

Permalink
Dockerfile builds added
Browse files Browse the repository at this point in the history
Signed-off-by: Yamil Urbina <[email protected]>
  • Loading branch information
yamilurbina committed Jun 15, 2019
1 parent aa8fd62 commit 7add74f
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
.git
.gitignore
build
Dockerfile
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM ruby:2.5 as ruby
WORKDIR /app
COPY . .
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
apt-get install -y nodejs && \
npm install && \
gem install bundler --no-document && \
bundle install && \
bundle exec middleman build

FROM nginx:alpine
COPY --from=ruby /app/build/ /usr/share/nginx/html
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ source 'https://rubygems.org'

gem 'middleman', '~> 4.2'
gem 'middleman-autoprefixer', '~> 2.7'
gem "middleman-minify-html"
gem 'tzinfo-data', platforms: [:mswin, :mingw, :jruby]
gem 'wdm', '~> 0.1', platforms: [:mswin, :mingw]
5 changes: 5 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ GEM
hamster (3.0.0)
concurrent-ruby (~> 1.0)
hashie (3.6.0)
htmlcompressor (0.2.0)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
kramdown (1.17.0)
Expand Down Expand Up @@ -70,6 +71,9 @@ GEM
servolux
tilt (~> 2.0.9)
uglifier (~> 3.0)
middleman-minify-html (3.4.1)
htmlcompressor (~> 0.2.0)
middleman-core (>= 3.2)
minitest (5.11.3)
padrino-helpers (0.13.3.4)
i18n (~> 0.6, >= 0.6.7)
Expand Down Expand Up @@ -103,6 +107,7 @@ PLATFORMS
DEPENDENCIES
middleman (~> 4.2)
middleman-autoprefixer (~> 2.7)
middleman-minify-html
tzinfo-data
wdm (~> 0.1)

Expand Down
11 changes: 7 additions & 4 deletions config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
prefix.browsers = "last 2 versions"
end

activate :asset_hash

# Layouts
# https://middlemanapp.com/basics/layouts/

Expand Down Expand Up @@ -40,7 +42,8 @@
# Build-specific configuration
# https://middlemanapp.com/advanced/configuration/#environment-specific-settings

# configure :build do
# activate :minify_css
# activate :minify_javascript
# end
configure :build do
activate :minify_css
activate :minify_javascript
activate :minify_html
end
6 changes: 3 additions & 3 deletions source/stylesheets/site.css.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ $info: #367C92;

@font-face {
font-family: "Manrope";
src: url("manrope-bold.woff2") format("woff2"),
url("manrope-bold.woff") format("woff"),
url("manrope-bold.otf") format("truetype");
src: url("/fonts/manrope-bold.woff2") format("woff2"),
url("/fonts/manrope-bold.woff") format("woff"),
url("/fonts/manrope-bold.otf") format("truetype");
font-style: normal;
font-weight: 700; }

Expand Down

0 comments on commit 7add74f

Please sign in to comment.