-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feature/add_gallery_module_0.27
- Loading branch information
Showing
72 changed files
with
2,609 additions
and
478 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,3 +97,4 @@ yarn-debug.log* | |
coverage/ | ||
public/sw.js* | ||
app/compiled_views/ | ||
certificate-https-local/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Builder Stage | ||
FROM ruby:3.0.6-slim as builder | ||
|
||
ENV RAILS_ENV=production \ | ||
SECRET_KEY_BASE=dummy | ||
|
||
WORKDIR /app | ||
|
||
RUN apt-get update -q && \ | ||
apt-get install -yq libpq-dev curl git libicu-dev build-essential openssl && \ | ||
curl https://deb.nodesource.com/setup_16.x | bash && \ | ||
apt-get install -y nodejs && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
npm install --global yarn && \ | ||
gem install bundler:2.4.9 | ||
|
||
COPY Gemfile Gemfile.lock ./ | ||
RUN bundle config set --local without 'development test' && \ | ||
bundle install -j"$(nproc)" | ||
|
||
COPY package.json yarn.lock ./ | ||
COPY packages packages | ||
RUN yarn install --frozen-lock | ||
|
||
COPY . . | ||
|
||
RUN bundle exec bootsnap precompile --gemfile app/ lib/ config/ bin/ db/ && \ | ||
bundle exec rails deface:precompile && \ | ||
bundle exec rails assets:precompile | ||
|
||
run mkdir certificate-https-local | ||
RUN openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -subj "/C=FR/ST=France/L=Paris/O=decidim/CN=decidim.eu" -keyout ./certificate-https-local/key.pem -out ./certificate-https-local/cert.pem; | ||
|
||
# Runner Stage | ||
FROM ruby:3.0.6-slim as runner | ||
|
||
ENV RAILS_ENV=production \ | ||
SECRET_KEY_BASE=dummy \ | ||
RAILS_LOG_TO_STDOUT=true \ | ||
LD_PRELOAD="libjemalloc.so.2" \ | ||
MALLOC_CONF="background_thread:true,metadata_thp:auto,dirty_decay_ms:5000,muzzy_decay_ms:5000,narenas:2" | ||
|
||
WORKDIR /app | ||
|
||
RUN apt-get update -q && \ | ||
apt-get install -yq postgresql-client imagemagick libproj-dev proj-bin libjemalloc2 && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* && \ | ||
gem install bundler:2.4.9 | ||
|
||
COPY --from=builder /usr/local/bundle /usr/local/bundle | ||
COPY --from=builder /app /app | ||
|
||
EXPOSE 3000 | ||
CMD ["bundle", "exec", "rails", "server", "-b", "ssl://0.0.0.0:3000?key=/app/certificate-https-local/key.pem&cert=/app/certificate-https-local/cert.pem"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.