1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-08-06 17:41:01 +00:00

Use environment variables in config files

This commit is contained in:
Yassine Guedidi 2025-01-11 01:50:41 +01:00
parent ad84d2b13b
commit 7cd46cb292
5 changed files with 44 additions and 44 deletions

View file

@ -10,9 +10,9 @@ framework:
#esi: ~
translator:
enabled: true
fallback: "%locale%"
fallback: "%env(LOCALE)%"
default_path: '%kernel.project_dir%/translations'
secret: "%secret%"
secret: "%env(SECRET)%"
router:
resource: "%kernel.project_dir%/app/config/routing.yml"
strict_requirements: ~
@ -20,7 +20,7 @@ framework:
csrf_protection: ~
validation:
enable_annotations: true
default_locale: "%locale%"
default_locale: "%env(LOCALE)%"
trusted_hosts: ~
session:
# handler_id set to null will use default session handler from php.ini
@ -30,10 +30,10 @@ framework:
fragments: ~
http_method_override: true
assets:
base_url: '%domain_name%'
base_url: '%env(DOMAIN_NAME)%'
json_manifest_path: '%kernel.project_dir%/web/build/manifest.json'
mailer:
dsn: "%mailer_dsn%"
dsn: "%env(MAILER_DSN)%"
http_client:
scoped_clients:
download_images.client:
@ -58,8 +58,8 @@ twig:
form_themes:
- "@SpiriitFormFilter/Form/form_div_layout.html.twig"
globals:
wallabag_url: '%domain_name%'
registration_enabled: '%fosuser_registration%'
wallabag_url: '%env(DOMAIN_NAME)%'
registration_enabled: '%env(bool:FOSUSER_REGISTRATION)%'
# Doctrine Configuration
doctrine:
@ -82,7 +82,7 @@ doctrine:
alias: Wallabag
stof_doctrine_extensions:
default_locale: "%locale%"
default_locale: "%env(LOCALE)%"
translation_fallback: true
orm:
default:
@ -190,9 +190,9 @@ fos_user:
user_class: Wallabag\Entity\User
registration:
confirmation:
enabled: "%fosuser_confirmation%"
enabled: "%env(bool:FOSUSER_CONFIRMATION)%"
from_email:
address: "%from_email%"
address: "%env(FROM_EMAIL)%"
sender_name: wallabag
service:
mailer: Wallabag\Mailer\UserMailer
@ -206,8 +206,8 @@ fos_oauth_server:
service:
user_provider: fos_user.user_provider.username_email
options:
refresh_token_lifetime: "%fos_oauth_server_refresh_token_lifetime%"
access_token_lifetime: "%fos_oauth_server_access_token_lifetime%"
refresh_token_lifetime: "%env(FOS_OAUTH_SERVER_REFRESH_TOKEN_LIFETIME)%"
access_token_lifetime: "%env(FOS_OAUTH_SERVER_ACCESS_TOKEN_LIFETIME)%"
scheb_two_factor:
trusted_device:
@ -220,12 +220,12 @@ scheb_two_factor:
google:
enabled: true
issuer: "%server_name%"
issuer: "%env(SERVER_NAME)%"
template: "Authentication/form.html.twig"
email:
enabled: true
sender_email: "%twofactor_sender%"
sender_email: "%env(TWOFACTOR_SENDER)%"
digits: 6
template: "Authentication/form.html.twig"
mailer: Wallabag\Mailer\AuthCodeMailer
@ -237,10 +237,10 @@ rulerz:
old_sound_rabbit_mq:
connections:
default:
host: "%rabbitmq_host%"
port: "%rabbitmq_port%"
user: "%rabbitmq_user%"
password: "%rabbitmq_password%"
host: "%env(RABBITMQ_HOST)%"
port: "%env(int:RABBITMQ_PORT)%"
user: "%env(RABBITMQ_USER)%"
password: "%env(RABBITMQ_PASSWORD)%"
vhost: /
lazy: true
producers:
@ -318,7 +318,7 @@ old_sound_rabbit_mq:
queue_options:
name: 'wallabag.import.pocket'
callback: wallabag.consumer.amqp.pocket
qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"}
qos_options: {prefetch_count: "%env(int:RABBITMQ_PREFETCH_COUNT)%"}
import_readability:
connection: default
exchange_options:
@ -327,7 +327,7 @@ old_sound_rabbit_mq:
queue_options:
name: 'wallabag.import.readability'
callback: wallabag.consumer.amqp.readability
qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"}
qos_options: {prefetch_count: "%env(int:RABBITMQ_PREFETCH_COUNT)%"}
import_instapaper:
connection: default
exchange_options:
@ -336,7 +336,7 @@ old_sound_rabbit_mq:
queue_options:
name: 'wallabag.import.instapaper'
callback: wallabag.consumer.amqp.instapaper
qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"}
qos_options: {prefetch_count: "%env(int:RABBITMQ_PREFETCH_COUNT)%"}
import_pinboard:
connection: default
exchange_options:
@ -345,7 +345,7 @@ old_sound_rabbit_mq:
queue_options:
name: 'wallabag.import.pinboard'
callback: wallabag.consumer.amqp.pinboard
qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"}
qos_options: {prefetch_count: "%env(int:RABBITMQ_PREFETCH_COUNT)%"}
import_delicious:
connection: default
exchange_options:
@ -354,7 +354,7 @@ old_sound_rabbit_mq:
queue_options:
name: 'wallabag.import.delicious'
callback: wallabag.consumer.amqp.delicious
qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"}
qos_options: {prefetch_count: "%env(int:RABBITMQ_PREFETCH_COUNT)%"}
import_wallabag_v1:
connection: default
exchange_options:
@ -363,7 +363,7 @@ old_sound_rabbit_mq:
queue_options:
name: 'wallabag.import.wallabag_v1'
callback: wallabag.consumer.amqp.wallabag_v1
qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"}
qos_options: {prefetch_count: "%env(int:RABBITMQ_PREFETCH_COUNT)%"}
import_wallabag_v2:
connection: default
exchange_options:
@ -372,7 +372,7 @@ old_sound_rabbit_mq:
queue_options:
name: 'wallabag.import.wallabag_v2'
callback: wallabag.consumer.amqp.wallabag_v2
qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"}
qos_options: {prefetch_count: "%env(int:RABBITMQ_PREFETCH_COUNT)%"}
import_elcurator:
connection: default
exchange_options:
@ -381,7 +381,7 @@ old_sound_rabbit_mq:
queue_options:
name: 'wallabag.import.elcurator'
callback: wallabag.consumer.amqp.elcurator
qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"}
qos_options: {prefetch_count: "%env(int:RABBITMQ_PREFETCH_COUNT)%"}
import_omnivore:
connection: default
exchange_options:
@ -390,7 +390,7 @@ old_sound_rabbit_mq:
queue_options:
name: 'wallabag.import.omnivore'
callback: wallabag.consumer.amqp.omnivore
qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"}
qos_options: {prefetch_count: "%env(int:RABBITMQ_PREFETCH_COUNT)%"}
import_firefox:
connection: default
exchange_options:
@ -399,7 +399,7 @@ old_sound_rabbit_mq:
queue_options:
name: 'wallabag.import.firefox'
callback: wallabag.consumer.amqp.firefox
qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"}
qos_options: {prefetch_count: "%env(int:RABBITMQ_PREFETCH_COUNT)%"}
import_chrome:
connection: default
exchange_options:
@ -408,7 +408,7 @@ old_sound_rabbit_mq:
queue_options:
name: 'wallabag.import.chrome'
callback: wallabag.consumer.amqp.chrome
qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"}
qos_options: {prefetch_count: "%env(int:RABBITMQ_PREFETCH_COUNT)%"}
import_shaarli:
connection: default
exchange_options:
@ -417,7 +417,7 @@ old_sound_rabbit_mq:
queue_options:
name: 'wallabag.import.shaarli'
callback: wallabag.consumer.amqp.shaarli
qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"}
qos_options: {prefetch_count: "%env(int:RABBITMQ_PREFETCH_COUNT)%"}
import_pocket_html:
connection: default
exchange_options:
@ -426,7 +426,7 @@ old_sound_rabbit_mq:
queue_options:
name: 'wallabag.import.pocket_html'
callback: wallabag.consumer.amqp.pocket_html
qos_options: {prefetch_count: "%rabbitmq_prefetch_count%"}
qos_options: {prefetch_count: "%env(int:RABBITMQ_PREFETCH_COUNT)%"}
fos_js_routing:
routes_to_expose:

View file

@ -21,4 +21,4 @@ monolog:
type: console
sentry:
dsn: "%sentry_dsn%"
dsn: "%env(SENTRY_DSN)%"

View file

@ -45,7 +45,7 @@ security:
anonymous: true
remember_me:
secret: "%secret%"
secret: "%env(SECRET)%"
lifetime: 31536000
path: /
domain: ~

View file

@ -15,15 +15,15 @@ services:
$projectDir: '%kernel.project_dir%'
$debug: '%kernel.debug%'
$defaultLocale: '%kernel.default_locale%'
$wallabagUrl: '%domain_name%'
$tablePrefix: "%database_table_prefix%"
$wallabagUrl: '%env(DOMAIN_NAME)%'
$tablePrefix: "%env(DATABASE_TABLE_PREFIX)%"
$encryptionKeyPath: "%wallabag.site_credentials.encryption_key_path%"
$fetchingErrorMessageTitle: "%wallabag.fetching_error_message_title%"
$fetchingErrorMessage: '%wallabag.fetching_error_message%'
$languages: '%wallabag.languages%'
$lifeTime: '%wallabag.cache_lifetime%'
$logoPath: 'web/img/appicon/apple-touch-icon-152.png'
$registrationEnabled: '%fosuser_registration%'
$registrationEnabled: '%env(bool:FOSUSER_REGISTRATION)%'
$restrictedAccess: '@=service(''craue_config'').get(''restricted_access'')'
$senderEmail: "%scheb_two_factor.email.sender_email%"
$senderName: "%scheb_two_factor.email.sender_name%"
@ -187,7 +187,7 @@ services:
Wallabag\Event\Subscriber\SchemaAdapterSubscriber:
arguments:
$databaseTablePrefix: "%database_table_prefix%"
$databaseTablePrefix: "%env(DATABASE_TABLE_PREFIX)%"
tags:
- { name: doctrine.event_subscriber }
@ -249,11 +249,11 @@ services:
Predis\Client:
arguments:
$parameters:
scheme: '%redis_scheme%'
host: '%redis_host%'
port: '%redis_port%'
path: '%redis_path%'
password: '%redis_password%'
scheme: '%env(REDIS_SCHEME)%'
host: '%env(REDIS_HOST)%'
port: '%env(int:REDIS_PORT)%'
path: '%env(REDIS_PATH)%'
password: '%env(REDIS_PASSWORD)%'
Wallabag\Event\Subscriber\SQLiteCascadeDeleteSubscriber:
tags:
@ -269,7 +269,7 @@ services:
Wallabag\Command\InstallCommand:
arguments:
$databaseDriver: '%database_driver%'
$databaseDriver: '%env(DATABASE_DRIVER)%'
$defaultSettings: '%wallabag.default_internal_settings%'
$defaultIgnoreOriginInstanceRules: '%wallabag.default_ignore_origin_instance_rules%'

View file

@ -25,7 +25,7 @@ parameters:
el: 'Ελληνικά'
gl: 'Galego'
wallabag.items_on_page: 12
wallabag.language: '%locale%'
wallabag.language: '%env(LOCALE)%'
wallabag.feed_limit: 50
wallabag.reading_speed: 200
wallabag.cache_lifetime: 10