Bump Decidim to 0.20.0 + install imagick

This commit is contained in:
Disassembler 2020-03-12 23:54:17 +01:00
parent 76bef22633
commit 6aa4eb7778
No known key found for this signature in database
GPG Key ID: 524BD33A0EE29499
6 changed files with 237 additions and 239 deletions

View File

@ -1,3 +1,2 @@
user = Decidim::System::Admin.new(email: "${DECIDIM_ADMIN_EMAIL}", password: "${DECIDIM_ADMIN_PWD}", password_confirmation: "${DECIDIM_ADMIN_PWD}")
user.save!
Decidim::System::Admin.create!(email: "${DECIDIM_ADMIN_EMAIL}", password: "${DECIDIM_ADMIN_PWD}", password_confirmation: "${DECIDIM_ADMIN_PWD}")
quit

View File

@ -1,104 +1,104 @@
Rails.application.configure do
# Settings specified here will take precedence over those in config/application.rb.
# Code is not reloaded between requests.
config.cache_classes = true
# Eager load code on boot. This eager loads most of Rails and
# your application in memory, allowing both threaded web servers
# and those relying on copy on write to perform better.
# Rake tasks automatically ignore this option for performance.
config.eager_load = true
# Full error reports are disabled and caching is turned on.
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
# Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
# or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
# config.require_master_key = true
# Disable serving static files from the `/public` folder by default since
# Apache or NGINX already handles this.
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
# Compress JavaScripts and CSS.
config.assets.js_compressor = Uglifier.new(:harmony => true)
# config.assets.css_compressor = :sass
# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = false
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
# config.action_controller.asset_host = 'http://assets.example.com'
# Specifies the header that your server uses for sending files.
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
# Store uploaded files on the local file system (see config/storage.yml for options)
config.active_storage.service = :local
# Mount Action Cable outside main process or domain
# config.action_cable.mount_path = nil
# config.action_cable.url = 'wss://example.com/cable'
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
config.force_ssl = true
# Use the lowest log level to ensure availability of diagnostic information
# when problems arise.
config.log_level = :info
# Prepend all log lines with the following tags.
config.log_tags = [ :request_id ]
# Use a different cache store in production.
# config.cache_store = :mem_cache_store
# Use a real queuing backend for Active Job (and separate queues per environment)
# config.active_job.queue_adapter = :resque
# config.active_job.queue_name_prefix = "decidim-app_#{Rails.env}"
config.action_mailer.perform_caching = false
# Ignore bad email addresses and do not raise email delivery errors.
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
# config.action_mailer.raise_delivery_errors = false
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation cannot be found).
config.i18n.fallbacks = true
# Send deprecation notices to registered listeners.
config.active_support.deprecation = :notify
# Use default logging formatter so that PID and timestamp are not suppressed.
config.log_formatter = ::Logger::Formatter.new
config.action_mailer.smtp_settings = {
:address => Rails.application.secrets.smtp_address,
:port => Rails.application.secrets.smtp_port,
:authentication => Rails.application.secrets.smtp_authentication,
:user_name => Rails.application.secrets.smtp_username,
:password => Rails.application.secrets.smtp_password,
:domain => Rails.application.secrets.smtp_domain,
:enable_starttls_auto => Rails.application.secrets.smtp_starttls_auto,
:openssl_verify_mode => 'none'
}
# Use a different logger for distributed setups.
# require 'syslog/logger'
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
if ENV["RAILS_LOG_TO_STDOUT"].present?
logger = ActiveSupport::Logger.new(STDOUT)
logger.formatter = config.log_formatter
config.logger = ActiveSupport::TaggedLogging.new(logger)
end
# Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false
# Settings specified here will take precedence over those in config/application.rb.
# Code is not reloaded between requests.
config.cache_classes = true
# Eager load code on boot. This eager loads most of Rails and
# your application in memory, allowing both threaded web servers
# and those relying on copy on write to perform better.
# Rake tasks automatically ignore this option for performance.
config.eager_load = true
# Full error reports are disabled and caching is turned on.
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
# Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
# or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
# config.require_master_key = true
# Disable serving static files from the `/public` folder by default since
# Apache or NGINX already handles this.
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
# Compress JavaScripts and CSS.
config.assets.js_compressor = Uglifier.new(:harmony => true)
# config.assets.css_compressor = :sass
# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = false
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
# config.action_controller.asset_host = 'http://assets.example.com'
# Specifies the header that your server uses for sending files.
# config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
# Store uploaded files on the local file system (see config/storage.yml for options)
config.active_storage.service = :local
# Mount Action Cable outside main process or domain
# config.action_cable.mount_path = nil
# config.action_cable.url = 'wss://example.com/cable'
# config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
config.force_ssl = true
# Use the lowest log level to ensure availability of diagnostic information
# when problems arise.
config.log_level = :info
# Prepend all log lines with the following tags.
config.log_tags = [ :request_id ]
# Use a different cache store in production.
# config.cache_store = :mem_cache_store
# Use a real queuing backend for Active Job (and separate queues per environment)
# config.active_job.queue_adapter = :resque
# config.active_job.queue_name_prefix = "decidim-app_#{Rails.env}"
config.action_mailer.perform_caching = false
# Ignore bad email addresses and do not raise email delivery errors.
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
# config.action_mailer.raise_delivery_errors = false
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation cannot be found).
config.i18n.fallbacks = true
# Send deprecation notices to registered listeners.
config.active_support.deprecation = :notify
# Use default logging formatter so that PID and timestamp are not suppressed.
config.log_formatter = ::Logger::Formatter.new
config.action_mailer.smtp_settings = {
:address => Rails.application.secrets.smtp_address,
:port => Rails.application.secrets.smtp_port,
:authentication => Rails.application.secrets.smtp_authentication,
:user_name => Rails.application.secrets.smtp_username,
:password => Rails.application.secrets.smtp_password,
:domain => Rails.application.secrets.smtp_domain,
:enable_starttls_auto => Rails.application.secrets.smtp_starttls_auto,
:openssl_verify_mode => 'none'
}
# Use a different logger for distributed setups.
# require 'syslog/logger'
# config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
if ENV["RAILS_LOG_TO_STDOUT"].present?
logger = ActiveSupport::Logger.new(STDOUT)
logger.formatter = config.log_formatter
config.logger = ActiveSupport::TaggedLogging.new(logger)
end
# Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false
end

View File

@ -1,128 +1,128 @@
# frozen_string_literal: true
Decidim.configure do |config|
config.application_name = "Decidim"
config.mailer_sender = "admin@example.com"
# Change these lines to set your preferred locales
config.default_locale = :cs
config.available_locales = [:cs, :sk, :en, :de, :fr, :es]
# Geocoder configuration
# config.geocoder = {
# static_map_url: "https://image.maps.cit.api.here.com/mia/1.6/mapview",
# here_app_id: Rails.application.secrets.geocoder[:here_app_id],
# here_app_code: Rails.application.secrets.geocoder[:here_app_code]
# }
# Custom resource reference generator method
# config.reference_generator = lambda do |resource, component|
# # Implement your custom method to generate resources references
# "1234-#{resource.id}"
# end
# Currency unit
# config.currency_unit = "€"
# The number of reports which an object can receive before hiding it
# config.max_reports_before_hiding = 3
# Custom HTML Header snippets
#
# The most common use is to integrate third-party services that require some
# extra JavaScript or CSS. Also, you can use it to add extra meta tags to the
# HTML. Note that this will only be rendered in public pages, not in the admin
# section.
#
# Before enabling this you should ensure that any tracking that might be done
# is in accordance with the rules and regulations that apply to your
# environment and usage scenarios. This component also comes with the risk
# that an organization's administrator injects malicious scripts to spy on or
# take over user accounts.
#
config.enable_html_header_snippets = false
# SMS gateway configuration
#
# If you want to verify your users by sending a verification code via
# SMS you need to provide a SMS gateway service class.
#
# An example class would be something like:
#
# class MySMSGatewayService
# attr_reader :mobile_phone_number, :code
#
# def initialize(mobile_phone_number, code)
# @mobile_phone_number = mobile_phone_number
# @code = code
# end
#
# def deliver_code
# # Actual code to deliver the code
# true
# end
# end
#
# config.sms_gateway_service = "MySMSGatewayService"
# Timestamp service configuration
#
# Provide a class to generate a timestamp for a document. The instances of
# this class are initialized with a hash containing the :document key with
# the document to be timestamped as value. The istances respond to a
# timestamp public method with the timestamp
#
# An example class would be something like:
#
# class MyTimestampService
# attr_accessor :document
#
# def initialize(args = {})
# @document = args.fetch(:document)
# end
#
# def timestamp
# # Code to generate timestamp
# "My timestamp"
# end
# end
#
# config.timestamp_service = "MyTimestampService"
# PDF signature service configuration
#
# Provide a class to process a pdf and return the document including a
# digital signature. The instances of this class are initialized with a hash
# containing the :pdf key with the pdf file content as value. The instances
# respond to a signed_pdf method containing the pdf with the signature
#
# An example class would be something like:
#
# class MyPDFSignatureService
# attr_accessor :pdf
#
# def initialize(args = {})
# @pdf = args.fetch(:pdf)
# end
#
# def signed_pdf
# # Code to return the pdf signed
# end
# end
#
# config.pdf_signature_service = "MyPDFSignatureService"
# Etherpad configuration
#
# Only needed if you want to have Etherpad integration with Decidim. See
# Decidim docs at docs/services/etherpad.md in order to set it up.
#
# config.etherpad = {
# server: Rails.application.secrets.etherpad[:server],
# api_key: Rails.application.secrets.etherpad[:api_key],
# api_version: Rails.application.secrets.etherpad[:api_version]
# }
end
Rails.application.config.i18n.available_locales = Decidim.available_locales
Rails.application.config.i18n.default_locale = Decidim.default_locale
config.application_name = "Decidim"
config.mailer_sender = "admin@example.com"
# Change these lines to set your preferred locales
config.default_locale = :cs
config.available_locales = [:cs, :sk, :en, :de, :fr, :es]
# Geocoder configuration
# config.geocoder = {
# static_map_url: "https://image.maps.cit.api.here.com/mia/1.6/mapview",
# here_app_id: Rails.application.secrets.geocoder[:here_app_id],
# here_app_code: Rails.application.secrets.geocoder[:here_app_code]
# }
# Custom resource reference generator method
# config.reference_generator = lambda do |resource, component|
# # Implement your custom method to generate resources references
# "1234-#{resource.id}"
# end
# Currency unit
# config.currency_unit = "€"
# The number of reports which an object can receive before hiding it
# config.max_reports_before_hiding = 3
# Custom HTML Header snippets
#
# The most common use is to integrate third-party services that require some
# extra JavaScript or CSS. Also, you can use it to add extra meta tags to the
# HTML. Note that this will only be rendered in public pages, not in the admin
# section.
#
# Before enabling this you should ensure that any tracking that might be done
# is in accordance with the rules and regulations that apply to your
# environment and usage scenarios. This component also comes with the risk
# that an organization's administrator injects malicious scripts to spy on or
# take over user accounts.
#
config.enable_html_header_snippets = false
# SMS gateway configuration
#
# If you want to verify your users by sending a verification code via
# SMS you need to provide a SMS gateway service class.
#
# An example class would be something like:
#
# class MySMSGatewayService
# attr_reader :mobile_phone_number, :code
#
# def initialize(mobile_phone_number, code)
# @mobile_phone_number = mobile_phone_number
# @code = code
# end
#
# def deliver_code
# # Actual code to deliver the code
# true
# end
# end
#
# config.sms_gateway_service = "MySMSGatewayService"
# Timestamp service configuration
#
# Provide a class to generate a timestamp for a document. The instances of
# this class are initialized with a hash containing the :document key with
# the document to be timestamped as value. The istances respond to a
# timestamp public method with the timestamp
#
# An example class would be something like:
#
# class MyTimestampService
# attr_accessor :document
#
# def initialize(args = {})
# @document = args.fetch(:document)
# end
#
# def timestamp
# # Code to generate timestamp
# "My timestamp"
# end
# end
#
# config.timestamp_service = "MyTimestampService"
# PDF signature service configuration
#
# Provide a class to process a pdf and return the document including a
# digital signature. The instances of this class are initialized with a hash
# containing the :pdf key with the pdf file content as value. The instances
# respond to a signed_pdf method containing the pdf with the signature
#
# An example class would be something like:
#
# class MyPDFSignatureService
# attr_accessor :pdf
#
# def initialize(args = {})
# @pdf = args.fetch(:pdf)
# end
#
# def signed_pdf
# # Code to return the pdf signed
# end
# end
#
# config.pdf_signature_service = "MyPDFSignatureService"
# Etherpad configuration
#
# Only needed if you want to have Etherpad integration with Decidim. See
# Decidim docs at docs/services/etherpad.md in order to set it up.
#
# config.etherpad = {
# server: Rails.application.secrets.etherpad[:server],
# api_key: Rails.application.secrets.etherpad[:api_key],
# api_version: Rails.application.secrets.etherpad[:api_version]
# }
end
Rails.application.config.i18n.available_locales = Decidim.available_locales
Rails.application.config.i18n.default_locale = Decidim.default_locale

View File

@ -4,13 +4,13 @@ source "https://rubygems.org"
ruby RUBY_VERSION
gem "decidim", "0.19.0"
# gem "decidim-consultations", "0.19.0"
# gem "decidim-initiatives", "0.19.0"
gem "decidim", "0.20.0"
# gem "decidim-consultations", "0.20.0"
# gem "decidim-initiatives", "0.20.0"
gem "bootsnap", "~> 1.3"
gem "puma", "~> 3.12"
gem "puma", "~> 3.12.2"
gem "uglifier", "~> 4.1"
gem "faker", "~> 1.9"
@ -18,7 +18,7 @@ gem "faker", "~> 1.9"
group :development, :test do
gem "byebug", "~> 11.0", platform: :mri
gem "decidim-dev", "0.19.0"
gem "decidim-dev", "0.20.0"
end
group :development do

View File

@ -1,4 +1,4 @@
IMAGE decidim_0.0.1-191113
IMAGE decidim_0.20.0-191113
FROM alpine3.9-ruby2.6_2.6.3-190620
# https://github.com/Platoniq/decidim-install/blob/master/decidim-bionic.md
@ -8,7 +8,7 @@ ENV RAILS_ENV production
RUN EOF
# Install runtime dependencies
apk --no-cache add curl libpq nodejs pcre procps tzdata
apk --no-cache add curl imagemagick libpq nodejs pcre procps tzdata
# Install build dependencies
apk --no-cache add --virtual .deps build-base curl-dev icu-dev libxml2-dev libxslt-dev linux-headers pcre-dev postgresql-dev zlib-dev
@ -49,7 +49,6 @@ RUN EOF
rm -f /etc/nginx/*.default
# Install Decidim
gem install bundler:1.17.3
bundle config build.nokogiri --use-system-libraries
gem install decidim
cd /srv

View File

@ -1,5 +1,5 @@
{
"version": "0.0.1-191113",
"version": "0.20.0-191113",
"meta": {
"title": "Decidim",
"desc-cs": "Platforma pro účast občanů",
@ -8,7 +8,7 @@
},
"containers": {
"decidim": {
"image": "decidim_0.0.1-191113",
"image": "decidim_0.20.0-191113",
"depends": [
"decidim-postgres"
],