Add dockerfile, create development deps group

This commit is contained in:
mcbloch 2020-08-29 14:56:36 +02:00
parent ef7e875f9f
commit 253ab92606
2 changed files with 36 additions and 1 deletions

32
Dockerfile Normal file
View file

@ -0,0 +1,32 @@
# ------- Build -------
FROM ruby:2.7.1-alpine3.11 AS build
RUN apk add build-base
RUN mkdir -p /app
WORKDIR /app
COPY Gemfile .
COPY Gemfile.lock .
RUN bundle config set deployment 'true'
RUN bundle config set without 'development'
RUN bundle install
COPY content content/
COPY layouts layouts/
COPY lib lib/
COPY Guardfile .
COPY Rules .
COPY nanoc.yaml .
RUN bundle exec nanoc
# ------- Release -------
FROM nginx:latest AS release
RUN rm -rf /usr/share/nginx/html/*
COPY --from=build /app/output /usr/share/nginx/html
ENTRYPOINT ["nginx", "-g", "daemon off;"]

View file

@ -3,7 +3,6 @@ source 'https://rubygems.org'
gem 'adsf' gem 'adsf'
gem 'autoprefixer-rails' gem 'autoprefixer-rails'
gem 'byebug'
gem 'htmlcompressor' gem 'htmlcompressor'
gem 'kramdown' gem 'kramdown'
gem 'mini_racer' gem 'mini_racer'
@ -18,3 +17,7 @@ group :nanoc do
gem 'guard-nanoc' gem 'guard-nanoc'
gem 'guard-livereload' gem 'guard-livereload'
end end
group :development do
gem 'byebug'
end