You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
90 lines
3.6 KiB
90 lines
3.6 KiB
# This file is the entry point to configure your own services. |
|
# Files in the packages/ subdirectory configure your dependencies. |
|
|
|
# Put parameters here that don't need to change on each machine where the app is deployed |
|
# https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration |
|
parameters: |
|
encryption_key: '%env(APP_ENCRYPTION_KEY)%' |
|
mercure_public_hub_url: '%env(MERCURE_PUBLIC_URL)%' |
|
nostr_default_relay: '%env(default::NOSTR_DEFAULT_RELAY)%' |
|
|
|
services: |
|
# default configuration for services in *this* file |
|
_defaults: |
|
autowire: true # Automatically injects dependencies in your services. |
|
autoconfigure: true # Automatically registers your services as commands, event subscribers, etc. |
|
bind: |
|
$nostrDefaultRelay: '%nostr_default_relay%' |
|
$environment: '%kernel.environment%' |
|
|
|
# makes classes in src/ available to be used as services |
|
# this creates a service per class whose id is the fully-qualified class name |
|
App\: |
|
resource: '../src/' |
|
exclude: |
|
- '../src/DependencyInjection/' |
|
- '../src/Entity/' |
|
- '../src/Kernel.php' |
|
|
|
# add more service definitions when explicit configuration is needed |
|
# please note that last definitions always *replace* previous ones |
|
Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler: |
|
arguments: |
|
- '%env(DATABASE_URL)%' |
|
|
|
# |
|
FOS\ElasticaBundle\Finder\FinderInterface: |
|
alias: fos_elastica.finder.articles |
|
|
|
# Redis |
|
Symfony\Component\Cache\Adapter\RedisAdapter: |
|
arguments: |
|
- '@Redis' |
|
|
|
|
|
Symfony\Component\HttpFoundation\Session\Storage\Handler\RedisSessionHandler: |
|
arguments: |
|
- '@Redis' |
|
# you can optionally pass an array of options. The only options are 'prefix' and 'ttl', |
|
# which define the prefix to use for the keys to avoid collision on the Redis server |
|
# and the expiration time for any given entry (in seconds), defaults are 'sf_s' and null: |
|
# - { 'prefix': 'my_prefix', 'ttl': 600 } |
|
|
|
Redis: |
|
# you can also use \RedisArray, \RedisCluster, \Relay\Relay or \Predis\Client classes |
|
class: Redis |
|
lazy: true |
|
calls: |
|
- connect: |
|
- '%env(REDIS_HOST)%' |
|
- auth: |
|
- '%env(REDIS_PASSWORD)%' |
|
|
|
# Native file session handler for fallback |
|
Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler: ~ |
|
|
|
# Graceful session handler that falls back to files on Redis outage |
|
App\Session\GracefulSessionHandler: |
|
arguments: |
|
- '@Symfony\Component\HttpFoundation\Session\Storage\Handler\RedisSessionHandler' |
|
- '@Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeFileSessionHandler' |
|
- '@logger' |
|
|
|
App\Provider\ArticleProvider: |
|
tags: |
|
- { name: fos_elastica.pager_provider, index: articles, type: article } |
|
|
|
App\EventListener\PopulateListener: |
|
tags: |
|
- { name: kernel.event_listener, event: 'FOS\\ElasticaBundle\\Event\\PostIndexPopulateEvent', method: 'postIndexPopulate' } |
|
|
|
App\Command\IndexArticlesCommand: |
|
arguments: |
|
$itemPersister: '@fos_elastica.object_persister.articles' |
|
|
|
App\Command\NostrEventFromYamlDefinitionCommand: |
|
arguments: |
|
$itemPersister: '@fos_elastica.object_persister.articles' |
|
|
|
App\Util\NostrPhp\TweakedRequest: ~ |
|
swentel\nostr\Request\Request: '@App\Util\NostrPhp\TweakedRequest'
|
|
|