1
0
مراية لـ https://github.com/postalserver/postal.git تم المزامنة 2025-12-01 05:43:04 +00:00

improve config file generation

هذا الالتزام موجود في:
Adam Cooke
2017-04-19 14:30:00 +01:00
الأصل 2fdba0ceb5
التزام a8ecb502fa
3 ملفات معدلة مع 17 إضافات و94 حذوفات

عرض الملف

@@ -1,77 +0,0 @@
web:
host: localhost:5000
protocol: http
fast_server_host: localhost:5010
fast_server_protocol: http
web_server:
bind_address: 0.0.0.0
port: 5000
max_threads: 5
fast_server:
bind_address: 0.0.0.0
port: 5010
ssl_port: 5011
proxy_protocol: false
general:
use_ip_pools: false
exception_url: xxx
logging:
stdout: false
max_log_file_size: 20
max_log_files: 10
main_db:
host: localhost
port: 3306
username: root
password:
database: postal
message_db:
host: localhost
port: 3306
username: root
password:
prefix: postal
rabbitmq:
host: localhost
port: 5672
username: guest
password: guest
vhost: null
smtp_server:
proxy_protocol: false
log_connect: true
evented: false
ports:
- 2525
dns:
spf_include: spf.example.com
dkim_identifier: postal
domain_verify_prefix: postal-verification
custom_return_path_prefix: psrp
return_path: amrp.example.com
smtp_server_hostname: smtp.example.com
route_domain: routes.example.com
track_domain: track.example.com
mx_records:
- mx1.example.com
- mx2.example.com
smtp:
host: smtp.atech.io
espect:
hosts:
- http://espect01.infra.atech.io
rails:
environment: development
secret_key: 1bd1a4fe0cb3fb166be9b0e388beb36557b49ae5bed97ab3e300353de06d1fe55522b21596db8ed5d83c031ca58696340fb3d70f59eb0c096bbe4034fc12e4cd

عرض الملف

@@ -1,8 +1,6 @@
web:
host: postal.example.com
protocol: https
fast_server_host: postal-click.example.com
fast_server_protocol: https
web_server:
bind_address: 0.0.0.0
@@ -13,11 +11,11 @@ fast_server:
bind_address: 0.0.0.0
port: 5010
ssl_port: 5011
proxy_protocol: true
proxy_protocol: false
general:
use_ip_pools: true
exception_url: xxx
use_ip_pools: false
exception_url: null
logging:
stdout: false
@@ -48,23 +46,22 @@ rabbitmq:
smtp_server:
proxy_protocol: false
log_connect: true
log_exclude_ips: null
evented: true
ports:
- 2525
dns:
spf_include: spf.example.com
dkim_identifier: postal
domain_verify_prefix: postal-verification
custom_return_path_prefix: psrp
return_path: amrp.example.com
smtp_server_hostname: smtp.example.com
route_domain: routes.example.com
track_domain: track.example.com
mx_records:
- mx1.example.com
- mx2.example.com
smtp_server_hostname: smtp.example.com
spf_include: spf.example.com
return_path: rp.example.com
route_domain: routes.example.com
track_domain: track.example.com
dkim_identifier: postal
domain_verify_prefix: postal-verification
custom_return_path_prefix: psrp
smtp:
host: smtp.blah
@@ -74,6 +71,6 @@ espect:
- http://espect01.infra.atech.io
rails:
environment: development
secret_key: 1bd1a4fe0cb3fb166be9b0e388beb36557b49ae5bed97ab3e300353de06d1fe55522b21596db8ed5d83c031ca58696340fb3d70f59eb0c096bbe4034fc12e4cd
environment: production
secret_key: {{secretkey}}

عرض الملف

@@ -1,9 +1,12 @@
#!/usr/bin/env ruby
require File.expand_path('../../lib/postal/config', __FILE__)
require 'openssl'
require 'securerandom'
unless File.exist?(Postal.config_file_path)
FileUtils.cp(config_root('postal.example.yml'), Postal.config_file_path)
content = File.read(Postal.config_root.join('postal.example.yml'))
content.gsub!('{{secretkey}}', SecureRandom.hex(128))
File.open(Postal.config_file_path, 'w') { |f| f.write(content) }
puts "Created example config file at #{Postal.config_file_path}"
end