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

View file

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

View file

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

View file

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

View file

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