From 51ea5f14ad95fa3dffcc3afc5bfb21a010fda314 Mon Sep 17 00:00:00 2001 From: Thomas Burkhalter Date: Tue, 11 Jun 2024 16:13:11 +0200 Subject: [PATCH] Add Deface precompile step --- Dockerfile | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index b59c0812..3fb040a7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,17 +5,22 @@ FROM ruby:3.0.6 AS build ARG BUILD_PACKAGES="git libicu-dev libpq-dev ca-certificates curl gnupg" -ARG BUILD_SCRIPT="set -uex \ - && mkdir -p /etc/apt/keyrings \ - && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ - && echo \"deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main\" > /etc/apt/sources.list.d/nodesource.list \ - && apt-get update \ - && apt-get install nodejs -y \ - && npm install -g yarn \ - && yarn set version 1.22.19" +ARG BUILD_SCRIPT=" \ + set -uex \ + && mkdir -p /etc/apt/keyrings \ + && curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \ + && echo \"deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main\" > /etc/apt/sources.list.d/nodesource.list \ + && apt-get update \ + && apt-get install nodejs -y \ + && npm install -g yarn \ + && yarn set version 1.22.19 \ +" ARG BUNDLE_WITHOUT="development:metrics:test" ARG BUNDLER_VERSION="2.4.18" -ARG POST_BUILD_SCRIPT="bundle exec rails assets:precompile" +ARG POST_BUILD_SCRIPT=" \ + bundle exec rails assets:precompile \ + && SKIP_MEMCACHE_CHECK=1 DEFACE_ENABLED=1 bundle exec rails deface:precompile \ +" ARG SKIP_MEMCACHE_CHECK="true" ARG RAILS_ENV="production" ARG SECRET_KEY_BASE="thisneedstobeset"