deployment fix

pull/607/head
Usman Sarwar 2 weeks ago
parent bfe1dbed82
commit 50500ff4cc

@ -18,12 +18,26 @@ class ConsoleRedirectController < ApplicationController
return redirect_to(new_user_session_path({ redir: params[:redir] }.compact)) if true_user.blank?
# In development, if console URL is localhost and doesn't exist, redirect to cloud URL instead
if Rails.env.development? && Docuseal::CONSOLE_URL.include?('localhost') && !Docuseal.multitenant?
if params[:redir].to_s.include?('/on_premises')
return redirect_to 'https://console.docuseal.com/on_premises', allow_other_host: true
elsif params[:redir].to_s.include?('/plans')
return redirect_to 'https://console.docuseal.com/plans', allow_other_host: true
def redirect_to_console
return unless development_console_redirect?
url = console_redirect_url
redirect_to url, allow_other_host: true if url
end
def development_console_redirect?
Rails.env.development? && console_localhost? && !Docuseal.multitenant?
end
def console_localhost?
Docuseal::CONSOLE_URL.include?('localhost')
end
def console_redirect_url
redir = params[:redir].to_s
return 'https://console.docuseal.com/on_premises' if redir.include?('/on_premises')
return 'https://console.docuseal.com/plans' if redir.include?('/plans')
end
auth = JsonWebToken.encode(uuid: true_user.uuid,

@ -84,7 +84,7 @@ Rails.application.configure do
port: ENV.fetch('SMTP_PORT', 587),
domain: ENV.fetch('SMTP_DOMAIN', nil),
user_name: ENV.fetch('SMTP_USERNAME', nil),
password: ENV.fetch('SMTP_PASSWORD', uqqq vkuy qivk lntt),
password: ENV.fetch('SMTP_PASSWORD', nil),
authentication: ENV.fetch('SMTP_PASSWORD', nil).present? ? ENV.fetch('SMTP_AUTHENTICATION', 'plain') : nil,
enable_starttls: ENV['SMTP_ENABLE_STARTTLS'] != 'false'
}.compact

Binary file not shown.

@ -8,9 +8,15 @@ services:
- 3000:3000
volumes:
- ./docuseal:/data/docuseal
# Only override the one file we changed; do NOT replace all of /app/lib
# (the image ships Puma plugins under /app/lib).
- ./lib/docuseal.rb:/app/lib/docuseal.rb
environment:
- RAILS_ENV=production
- FORCE_SSL=${HOST}
- DATABASE_URL=postgresql://postgres:postgres@postgres:5432/docuseal
# Bypass corrupted EncryptedConfig; set to your public URL (e.g. https://yourhost.com)
- APP_URL=${APP_URL:-http://localhost:3000}
postgres:
image: postgres:18

@ -110,10 +110,21 @@ module Docuseal
return DEFAULT_URL_OPTIONS if multitenant?
@default_url_options ||= begin
value = EncryptedConfig.find_by(key: EncryptedConfig::APP_URL_KEY)&.value if ENV['APP_URL'].blank?
value =
if ENV['APP_URL'].blank?
begin
EncryptedConfig.find_by(key: EncryptedConfig::APP_URL_KEY)&.value
rescue ActiveRecord::Encryption::Errors::Decryption, OpenSSL::Cipher::CipherError
nil
end
end
value ||= DEFAULT_APP_URL
url = Addressable::URI.parse(value)
{ host: url.host, port: url.port, protocol: url.scheme }
rescue ActiveRecord::Encryption::Errors::Decryption, OpenSSL::Cipher::CipherError
url = Addressable::URI.parse(DEFAULT_APP_URL)
{ host: url.host, port: url.port, protocol: url.scheme }
end
end

@ -204,7 +204,6 @@ module Submissions
fill_submitter_fields(submitter, submitter.account, pdfs_index, with_signature_id:, is_flatten:,
with_submitter_timezone:,
with_file_links:,
<<<<<<< HEAD
with_signature_id_reason:,
for_admin:)
@ -217,18 +216,6 @@ module Submissions
with_submitter_timezone: false, with_signature_id_reason: true, with_file_links: nil,
for_admin: false)
cell_layouter = HexaPDF::Layout::TextLayouter.new(text_valign: :center, text_align: :center)
=======
with_timestamp_seconds:,
with_signature_id_reason:)
end
def fill_submitter_fields(submitter, account, pdfs_index, with_signature_id:, is_flatten:, with_headings: nil,
with_submitter_timezone: false, with_signature_id_reason: true,
with_timestamp_seconds: false, with_file_links: nil)
cell_layouters = Hash.new do |hash, valign|
hash[valign] = HexaPDF::Layout::TextLayouter.new(text_valign: valign.to_sym, text_align: :center)
end
>>>>>>> master
attachments_data_cache = {}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save