Initial commit
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
framework:
|
||||
cache:
|
||||
pools:
|
||||
cache.dbal:
|
||||
adapter: cache.adapter.filesystem
|
||||
@@ -0,0 +1,86 @@
|
||||
doctrine:
|
||||
dbal:
|
||||
url: '%env(resolve:DATABASE_URL)%'
|
||||
|
||||
# IMPORTANT: You MUST configure your server version,
|
||||
# either here or in the DATABASE_URL env var (see .env file)
|
||||
#server_version: '16'
|
||||
|
||||
profiling_collect_backtrace: false
|
||||
use_savepoints: true
|
||||
result_cache: 'cache.dbal'
|
||||
types:
|
||||
# Shared Kernel
|
||||
email: App\SharedKernel\Infrastructure\Persistence\Doctrine\DBAL\Types\EmailType
|
||||
|
||||
# Aggregator
|
||||
article_id: App\Aggregator\Infrastructure\Persistence\Doctrine\DBAL\Types\ArticleIdType
|
||||
source_id: App\Aggregator\Infrastructure\Persistence\Doctrine\DBAL\Types\SourceIdType
|
||||
open_graph: App\Aggregator\Infrastructure\Persistence\Doctrine\DBAL\Types\OpenGraphType
|
||||
|
||||
# Identity and Access
|
||||
user_id: App\IdentityAndAccess\Infrastructure\Persistence\Doctrine\DBAL\Types\UserIdType
|
||||
login_attempt_id: App\IdentityAndAccess\Infrastructure\Persistence\Doctrine\DBAL\Types\LoginAttemptIdType
|
||||
login_history_id: App\IdentityAndAccess\Infrastructure\Persistence\Doctrine\DBAL\Types\LoginHistoryIdType
|
||||
verification_token_id: App\IdentityAndAccess\Infrastructure\Persistence\Doctrine\DBAL\Types\VerificationTokenIdType
|
||||
|
||||
# FeedManagement
|
||||
bookmark_id: App\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Types\BookmarkIdType
|
||||
followed_source_id: App\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Types\FollowedSourceIdType
|
||||
comment_id: App\FeedManagement\Infrastructure\Persistence\Doctrine\DBAL\Types\CommentIdType
|
||||
orm:
|
||||
auto_generate_proxy_classes: true
|
||||
enable_lazy_ghost_objects: true
|
||||
report_fields_where_declared: true
|
||||
validate_xml_mapping: false
|
||||
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
|
||||
auto_mapping: true
|
||||
mappings:
|
||||
Aggregator:
|
||||
is_bundle: false
|
||||
type: xml
|
||||
dir: '%kernel.project_dir%/config/doctrine/Aggregator'
|
||||
prefix: 'App\Aggregator\Domain\Model'
|
||||
IdentityAndAccess:
|
||||
is_bundle: false
|
||||
type: xml
|
||||
dir: '%kernel.project_dir%/config/doctrine/IdentityAndAccess'
|
||||
prefix: 'App\IdentityAndAccess\Domain\Model'
|
||||
FeedManagement:
|
||||
is_bundle: false
|
||||
type: xml
|
||||
dir: '%kernel.project_dir%/config/doctrine/FeedManagement'
|
||||
prefix: 'App\FeedManagement\Domain\Model'
|
||||
SharedKernel:
|
||||
is_bundle: false
|
||||
type: xml
|
||||
dir: '%kernel.project_dir%/config/doctrine/SharedKernel'
|
||||
prefix: 'App\SharedKernel\Domain\Model'
|
||||
controller_resolver:
|
||||
auto_mapping: false
|
||||
|
||||
when@test:
|
||||
doctrine:
|
||||
dbal:
|
||||
# "TEST_TOKEN" is typically set by ParaTest
|
||||
dbname_suffix: '_test%env(default::TEST_TOKEN)%'
|
||||
|
||||
when@prod:
|
||||
doctrine:
|
||||
orm:
|
||||
auto_generate_proxy_classes: false
|
||||
proxy_dir: '%kernel.build_dir%/doctrine/orm/Proxies'
|
||||
query_cache_driver:
|
||||
type: pool
|
||||
pool: doctrine.system_cache_pool
|
||||
result_cache_driver:
|
||||
type: pool
|
||||
pool: doctrine.result_cache_pool
|
||||
|
||||
framework:
|
||||
cache:
|
||||
pools:
|
||||
doctrine.result_cache_pool:
|
||||
adapter: cache.app
|
||||
doctrine.system_cache_pool:
|
||||
adapter: cache.system
|
||||
@@ -0,0 +1,6 @@
|
||||
doctrine_migrations:
|
||||
migrations_paths:
|
||||
# namespace is arbitrary but should be different from App\Migrations
|
||||
# as migrations classes should NOT be autoloaded
|
||||
'DoctrineMigrations': '%kernel.project_dir%/config/migrations'
|
||||
enable_profiler: false
|
||||
@@ -0,0 +1,25 @@
|
||||
# see https://symfony.com/doc/current/reference/configuration/framework.html
|
||||
framework:
|
||||
secret: '%env(APP_SECRET)%'
|
||||
#csrf_protection: true
|
||||
http_method_override: false
|
||||
handle_all_throwables: true
|
||||
|
||||
# Enables session support. Note that the session will ONLY be started if you read or write from it.
|
||||
# Remove or comment this section to explicitly disable session support.
|
||||
session:
|
||||
handler_id: null
|
||||
cookie_secure: auto
|
||||
cookie_samesite: lax
|
||||
storage_factory_id: session.storage.factory.native
|
||||
|
||||
#esi: true
|
||||
#fragments: true
|
||||
php_errors:
|
||||
log: true
|
||||
|
||||
when@test:
|
||||
framework:
|
||||
test: true
|
||||
session:
|
||||
storage_factory_id: session.storage.factory.mock_file
|
||||
@@ -0,0 +1,4 @@
|
||||
gesdinet_jwt_refresh_token:
|
||||
refresh_token_class: App\IdentityAndAccess\Domain\Model\Entity\RefreshToken
|
||||
ttl: 2592000 # 1 month
|
||||
ttl_update: true
|
||||
@@ -0,0 +1,5 @@
|
||||
lexik_jwt_authentication:
|
||||
secret_key: '%env(resolve:JWT_SECRET_KEY)%'
|
||||
public_key: '%env(resolve:JWT_PUBLIC_KEY)%'
|
||||
pass_phrase: '%env(JWT_PASSPHRASE)%'
|
||||
token_ttl: '%env(resolve:JWT_TTL)%'
|
||||
@@ -0,0 +1,3 @@
|
||||
framework:
|
||||
mailer:
|
||||
dsn: '%env(MAILER_DSN)%'
|
||||
@@ -0,0 +1,39 @@
|
||||
framework:
|
||||
messenger:
|
||||
# Uncomment this (and the failed transport below) to send failed messages to this transport for later handling.
|
||||
failure_transport: failed
|
||||
|
||||
transports:
|
||||
# https://symfony.com/doc/current/messenger.html#transport-configuration
|
||||
async:
|
||||
dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
|
||||
retry_strategy:
|
||||
max_retries: 3
|
||||
delay: 1000
|
||||
multiplier: 2
|
||||
max_delay: 0
|
||||
options:
|
||||
auto_setup: true
|
||||
failed:
|
||||
dsn: 'doctrine://default?queue_name=failed'
|
||||
options:
|
||||
auto_setup: true
|
||||
sync: 'sync://'
|
||||
|
||||
routing:
|
||||
App\SharedKernel\Application\Messaging\AsyncMessage: async
|
||||
Symfony\Component\Mailer\Messenger\SendEmailMessage: sync
|
||||
|
||||
default_bus: command.bus
|
||||
buses:
|
||||
command.bus: ~
|
||||
query.bus: ~
|
||||
message.bus: ~
|
||||
|
||||
when@test:
|
||||
framework:
|
||||
messenger:
|
||||
transports:
|
||||
# replace with your transport name here (e.g., my_transport: 'in-memory://')
|
||||
# For more Messenger testing tools, see https://github.com/zenstruck/messenger-test
|
||||
async: 'in-memory://'
|
||||
@@ -0,0 +1,72 @@
|
||||
monolog:
|
||||
channels:
|
||||
- deprecation # Deprecations are logged in the dedicated "deprecation" channel when it exists
|
||||
|
||||
when@dev:
|
||||
monolog:
|
||||
handlers:
|
||||
main:
|
||||
type: stream
|
||||
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
||||
level: debug
|
||||
channels: ["!app"]
|
||||
app:
|
||||
type: stream
|
||||
path: "%kernel.logs_dir%/app.%kernel.environment%.log"
|
||||
level: debug
|
||||
channels: ["app"]
|
||||
console:
|
||||
type: console
|
||||
level: debug
|
||||
process_psr_3_messages: false
|
||||
channels: ["app"]
|
||||
|
||||
when@test:
|
||||
monolog:
|
||||
handlers:
|
||||
main:
|
||||
type: fingers_crossed
|
||||
action_level: error
|
||||
handler: nested
|
||||
excluded_http_codes: [404, 405]
|
||||
channels: ["!event"]
|
||||
nested:
|
||||
type: stream
|
||||
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
||||
level: debug
|
||||
|
||||
when@prod:
|
||||
monolog:
|
||||
handlers:
|
||||
main:
|
||||
type: fingers_crossed
|
||||
action_level: error
|
||||
handler: nested
|
||||
excluded_http_codes: [404, 405]
|
||||
buffer_size: 50 # How many messages should be saved? Prevent memory leaks
|
||||
telegram:
|
||||
type: telegram
|
||||
level: critical
|
||||
channels: [ "!event" ]
|
||||
token: "%env(DEVY_TOKEN)%"
|
||||
channel: "%env(DEVY_CHANNEL)%"
|
||||
topic: "%env(int:DEVY_TOPIC)%"
|
||||
parse_mode: "MarkdownV2"
|
||||
disable_webpage_preview: true
|
||||
disable_notification: false
|
||||
split_long_messages: false
|
||||
formatter: App\SharedKernel\Infrastructure\Framework\Symfony\Logging\TelegramFormatter
|
||||
nested:
|
||||
type: rotating_file
|
||||
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
||||
level: error
|
||||
max_files: 10
|
||||
console:
|
||||
type: console
|
||||
level: info
|
||||
process_psr_3_messages: false
|
||||
channels: ["!event", "!doctrine"]
|
||||
deprecation:
|
||||
type: stream
|
||||
channels: [deprecation]
|
||||
path: "%kernel.logs_dir%/deprecation.log"
|
||||
@@ -0,0 +1,12 @@
|
||||
framework:
|
||||
router:
|
||||
utf8: true
|
||||
|
||||
# Configure how to generate URLs in non-HTTP contexts, such as CLI commands.
|
||||
# See https://symfony.com/doc/current/routing.html#generating-urls-in-commands
|
||||
#default_uri: http://localhost
|
||||
|
||||
when@prod:
|
||||
framework:
|
||||
router:
|
||||
strict_requirements: null
|
||||
@@ -0,0 +1,61 @@
|
||||
security:
|
||||
# https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords
|
||||
password_hashers:
|
||||
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
|
||||
# https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider
|
||||
providers:
|
||||
app_user_provider:
|
||||
id: App\IdentityAndAccess\Infrastructure\Framework\Symfony\Security\SecurityUserProvider
|
||||
|
||||
firewalls:
|
||||
dev:
|
||||
pattern: ^/(_(profiler|wdt)|css|images|js)/
|
||||
security:
|
||||
|
||||
login:
|
||||
pattern: ^/api/login
|
||||
stateless: true
|
||||
json_login:
|
||||
check_path: /api/login_check
|
||||
success_handler: lexik_jwt_authentication.handler.authentication_success
|
||||
failure_handler: lexik_jwt_authentication.handler.authentication_failure
|
||||
user_checker: App\IdentityAndAccess\Infrastructure\Framework\Symfony\Security\UserChecker
|
||||
|
||||
api:
|
||||
pattern: ^/api
|
||||
stateless: true
|
||||
entry_point: jwt
|
||||
jwt: ~
|
||||
refresh_jwt:
|
||||
check_path: /api/token/refresh
|
||||
logout:
|
||||
path: api_token_invalidate
|
||||
user_checker: App\IdentityAndAccess\Infrastructure\Framework\Symfony\Security\UserChecker
|
||||
|
||||
main:
|
||||
lazy: true
|
||||
provider: app_user_provider
|
||||
user_checker: App\IdentityAndAccess\Infrastructure\Framework\Symfony\Security\UserChecker
|
||||
|
||||
# Easy way to control access for large sections of your site
|
||||
# Note: Only the *first* access control that matches will be used
|
||||
access_control:
|
||||
- { path: ^/api/register, roles: PUBLIC_ACCESS }
|
||||
- { path: ^/api/login, roles: PUBLIC_ACCESS }
|
||||
- { path: ^/api/token/refresh, roles: PUBLIC_ACCESS }
|
||||
- { path: ^/api/password/(request|reset), roles: PUBLIC_ACCESS }
|
||||
- { path: ^/api/account/(unlock|confirm), roles: PUBLIC_ACCESS }
|
||||
- { path: ^/api, roles: IS_AUTHENTICATED_FULLY }
|
||||
|
||||
when@test:
|
||||
security:
|
||||
password_hashers:
|
||||
# By default, password hashers are resource intensive and take time. This is
|
||||
# important to generate secure password hashes. In tests however, secure hashes
|
||||
# are not important, waste resources and increase test times. The following
|
||||
# reduces the work factor to the lowest possible values.
|
||||
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface:
|
||||
algorithm: auto
|
||||
cost: 4 # Lowest possible value for bcrypt
|
||||
time_cost: 3 # Lowest possible value for argon
|
||||
memory_cost: 10 # Lowest possible value for argon
|
||||
@@ -0,0 +1,24 @@
|
||||
when@prod:
|
||||
sentry:
|
||||
dsn: "%env(SENTRY_DSN)%"
|
||||
register_error_listener: false
|
||||
register_error_handler: false
|
||||
options:
|
||||
traces_sample_rate: 0.1
|
||||
ignore_exceptions:
|
||||
- 'Symfony\Component\ErrorHandler\Error\FatalError'
|
||||
- 'Symfony\Component\Debug\Exception\FatalErrorException'
|
||||
monolog:
|
||||
handlers:
|
||||
sentry_fingers_crossed:
|
||||
type: fingers_crossed
|
||||
action_level: error
|
||||
handler: sentry
|
||||
excluded_http_codes: [404, 405]
|
||||
buffer_size: 50
|
||||
sentry:
|
||||
type: sentry
|
||||
level: !php/const Monolog\Logger::ERROR
|
||||
hub_id: Sentry\State\HubInterface
|
||||
fill_extra_context: true
|
||||
process_psr_3_messages: false
|
||||
@@ -0,0 +1,7 @@
|
||||
framework:
|
||||
default_locale: fr
|
||||
translator:
|
||||
default_path: '%kernel.project_dir%/translations'
|
||||
fallbacks:
|
||||
- en
|
||||
providers:
|
||||
@@ -0,0 +1,16 @@
|
||||
twig:
|
||||
file_name_pattern: '*.twig'
|
||||
date:
|
||||
format: 'd M Y'
|
||||
interval_format: '%d days'
|
||||
timezone: null
|
||||
number_format:
|
||||
decimals: 2
|
||||
decimal_point: ','
|
||||
thousands_separator: '.'
|
||||
globals:
|
||||
'application': '@App\SharedKernel\Domain\Application'
|
||||
|
||||
when@test:
|
||||
twig:
|
||||
strict_variables: true
|
||||
@@ -0,0 +1,11 @@
|
||||
framework:
|
||||
validation:
|
||||
# Enables validator auto-mapping support.
|
||||
# For instance, basic validation constraints will be inferred from Doctrine's metadata.
|
||||
#auto_mapping:
|
||||
# App\Entity\: []
|
||||
|
||||
when@test:
|
||||
framework:
|
||||
validation:
|
||||
not_compromised_password: false
|
||||
@@ -0,0 +1,11 @@
|
||||
when@dev:
|
||||
web_profiler:
|
||||
toolbar: true
|
||||
|
||||
framework:
|
||||
profiler:
|
||||
collect_serializer_data: true
|
||||
|
||||
when@test:
|
||||
framework:
|
||||
profiler: { collect: false }
|
||||
Reference in New Issue
Block a user