discourse/script
Michael Fitz-Payne df4a9f96ae DEV(cache_critical_dns): add additional service runtime variable
We'd like to lean on the DNS caching service for more than the standard
DB and Redis hosts, but without having to add additional code each time.
Define a new environment variable
DISCOURSE_DNS_CACHE_ADDITIONAL_SERVICE_NAMES (admittedly a mouthful)
which is a list of service names to be added to the static list at
process execution time.

For example, plugin foo may reference two services that you want to
cache the address of. By specifying the following two variables in the
process environment, cache_critical_dns will perform the lookup
alongside the DB and Redis host variables.

```
DISCOURSE_DNS_CACHE_ADDITIONAL_SERVICE_NAMES='FOO_SERVICE1,FOO_SERVICE2'
FOO_SERVICE1='foo.service1.example.com'
FOO_SERVICE1_SRV='foo._tcp.example.com'
FOO_SERVICE2='foo.service2.example.com'
```

The behaviour when it comes to SRV record lookup is the same as
previously implemented for the `DISCOURSE_DB_..` and
`DISCOURSE_REDIS_..` variables.

For the purposes of the health checks, services defined in the list _are
always considered healthy_. This is a compromise for conveniences sake.
Defining a dynamic method for health checks at runtime is not practical.

See t/88457/32.
2023-01-20 10:03:08 +10:00
..
benchmarks DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
bulk_import DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
demon_test FIX: Revert Demon::DemonBase back to Demon::Base (#8132) 2019-10-02 14:54:08 +10:00
import_scripts DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
.gitignore improvements to the mbox import script 2017-11-18 17:16:44 +01:00
alice.txt more progress towards live unread and new counts, unread message implemented, still to implement delete messages 2013-05-30 16:49:57 +10:00
analyse_message_bus.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
analyze_sidekiq_queues.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
bench.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
biggest_objects.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
boot_mem.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
cache_critical_dns DEV(cache_critical_dns): add additional service runtime variable 2023-01-20 10:03:08 +10:00
check_forking.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
copyright-deposit Add script for compiling copyright deposits (#9646) 2020-05-06 12:51:45 -04:00
db_timestamps_mover.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
diff_heaps.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
discourse DEV: Be more lenient in CLI confirmation (#16290) 2022-03-25 20:14:41 +00:00
docker_test.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
i18n_lint.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
measure.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
memory-analysis DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
memstats.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
micro_bench.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
mwrap_sidekiq PERF: avoid shelling to get hostname aggressively 2020-02-18 15:13:19 +11:00
profile_db_generator.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
promote_migrations DEV: Promote historic post_deploy migrations (#19492) 2022-12-16 13:36:30 +02:00
rails DEV: enable frozen string literal on all files 2019-05-13 09:31:32 +08:00
redis_memory.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
require_profiler.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
spawn_backup_restore.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
start_test_db.rb DEV: Wait for initdb to complete in docker.rake (#15614) 2022-01-17 17:45:39 +00:00
switch_container_ruby DEV: add script to switch ruby version from inside container 2019-03-25 17:41:24 +11:00
test_email_settings.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
test_mem.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
test_memory_leak.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
test_pretty_text.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
thread_detective.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00
user_simulator.rb DEV: Apply syntax_tree formatting to `script/*` 2023-01-09 11:13:22 +00:00