init
This commit is contained in:
24
api/config/packages/api_platform.yaml
Normal file
24
api/config/packages/api_platform.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
parameters:
|
||||
# Adds a fallback VARNISH_URL if the env var is not set.
|
||||
# This allows you to run cache:warmup even if your
|
||||
# environment variables are not available yet.
|
||||
# You should not need to change this value.
|
||||
env(VARNISH_URL): ''
|
||||
|
||||
api_platform:
|
||||
mapping:
|
||||
paths: ['%kernel.project_dir%/src/Entity']
|
||||
title: Hello API Platform
|
||||
version: 1.0.0
|
||||
# Varnish integration, remove if unwanted
|
||||
http_cache:
|
||||
invalidation:
|
||||
enabled: true
|
||||
varnish_urls: ['%env(VARNISH_URL)%']
|
||||
max_age: 0
|
||||
shared_max_age: 3600
|
||||
vary: ['Content-Type', 'Authorization']
|
||||
public: true
|
||||
# Mercure integration, remove if unwanted
|
||||
mercure:
|
||||
hub_url: '%env(MERCURE_SUBSCRIBE_URL)%'
|
||||
19
api/config/packages/cache.yaml
Normal file
19
api/config/packages/cache.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
framework:
|
||||
cache:
|
||||
# Put the unique name of your app here: the prefix seed
|
||||
# is used to compute stable namespaces for cache keys.
|
||||
#prefix_seed: your_vendor_name/app_name
|
||||
|
||||
# The app cache caches to the filesystem by default.
|
||||
# Other options include:
|
||||
|
||||
# Redis
|
||||
#app: cache.adapter.redis
|
||||
#default_redis_provider: redis://localhost
|
||||
|
||||
# APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues)
|
||||
#app: cache.adapter.apcu
|
||||
|
||||
# Namespaced pools use the above "app" backend by default
|
||||
#pools:
|
||||
#my.dedicated.cache: ~
|
||||
3
api/config/packages/dev/routing.yaml
Normal file
3
api/config/packages/dev/routing.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
framework:
|
||||
router:
|
||||
strict_requirements: true
|
||||
6
api/config/packages/dev/web_profiler.yaml
Normal file
6
api/config/packages/dev/web_profiler.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
web_profiler:
|
||||
toolbar: true
|
||||
intercept_redirects: false
|
||||
|
||||
framework:
|
||||
profiler: { only_exceptions: false }
|
||||
18
api/config/packages/doctrine.yaml
Normal file
18
api/config/packages/doctrine.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
doctrine:
|
||||
dbal:
|
||||
# configure these for your database server
|
||||
driver: 'pdo_pgsql'
|
||||
server_version: '10'
|
||||
|
||||
url: '%env(resolve:DATABASE_URL)%'
|
||||
orm:
|
||||
auto_generate_proxy_classes: true
|
||||
naming_strategy: doctrine.orm.naming_strategy.underscore
|
||||
auto_mapping: true
|
||||
mappings:
|
||||
App:
|
||||
is_bundle: false
|
||||
type: annotation
|
||||
dir: '%kernel.project_dir%/src/Entity'
|
||||
prefix: 'App\Entity'
|
||||
alias: App
|
||||
16
api/config/packages/framework.yaml
Normal file
16
api/config/packages/framework.yaml
Normal file
@@ -0,0 +1,16 @@
|
||||
framework:
|
||||
secret: '%env(APP_SECRET)%'
|
||||
#csrf_protection: true
|
||||
#http_method_override: 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: ~
|
||||
cookie_secure: auto
|
||||
cookie_samesite: lax
|
||||
|
||||
#esi: true
|
||||
#fragments: true
|
||||
php_errors:
|
||||
log: true
|
||||
5
api/config/packages/mercure.yaml
Normal file
5
api/config/packages/mercure.yaml
Normal file
@@ -0,0 +1,5 @@
|
||||
mercure:
|
||||
hubs:
|
||||
default:
|
||||
url: '%env(MERCURE_PUBLISH_URL)%'
|
||||
jwt: '%env(MERCURE_JWT_SECRET)%'
|
||||
10
api/config/packages/nelmio_cors.yaml
Normal file
10
api/config/packages/nelmio_cors.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
nelmio_cors:
|
||||
defaults:
|
||||
origin_regex: true
|
||||
allow_origin: ['%env(CORS_ALLOW_ORIGIN)%']
|
||||
allow_methods: ['GET', 'OPTIONS', 'POST', 'PUT', 'PATCH', 'DELETE']
|
||||
allow_headers: ['Content-Type', 'Authorization']
|
||||
expose_headers: ['Link']
|
||||
max_age: 3600
|
||||
paths:
|
||||
'^/': ~
|
||||
32
api/config/packages/prod/doctrine.yaml
Normal file
32
api/config/packages/prod/doctrine.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
doctrine:
|
||||
orm:
|
||||
auto_generate_proxy_classes: false
|
||||
metadata_cache_driver:
|
||||
type: service
|
||||
id: doctrine.system_cache_provider
|
||||
query_cache_driver:
|
||||
type: service
|
||||
id: doctrine.system_cache_provider
|
||||
result_cache_driver:
|
||||
type: service
|
||||
id: doctrine.result_cache_provider
|
||||
|
||||
services:
|
||||
doctrine.result_cache_provider:
|
||||
class: Symfony\Component\Cache\DoctrineProvider
|
||||
public: false
|
||||
arguments:
|
||||
- '@doctrine.result_cache_pool'
|
||||
doctrine.system_cache_provider:
|
||||
class: Symfony\Component\Cache\DoctrineProvider
|
||||
public: false
|
||||
arguments:
|
||||
- '@doctrine.system_cache_pool'
|
||||
|
||||
framework:
|
||||
cache:
|
||||
pools:
|
||||
doctrine.result_cache_pool:
|
||||
adapter: cache.app
|
||||
doctrine.system_cache_pool:
|
||||
adapter: cache.system
|
||||
4
api/config/packages/routing.yaml
Normal file
4
api/config/packages/routing.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
framework:
|
||||
router:
|
||||
strict_requirements: ~
|
||||
utf8: true
|
||||
22
api/config/packages/security.yaml
Normal file
22
api/config/packages/security.yaml
Normal file
@@ -0,0 +1,22 @@
|
||||
security:
|
||||
# https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
|
||||
providers:
|
||||
in_memory: { memory: ~ }
|
||||
firewalls:
|
||||
dev:
|
||||
pattern: ^/(_(profiler|wdt)|css|images|js)/
|
||||
security: false
|
||||
main:
|
||||
anonymous: true
|
||||
|
||||
# activate different ways to authenticate
|
||||
# https://symfony.com/doc/current/security.html#firewalls-authentication
|
||||
|
||||
# https://symfony.com/doc/current/security/impersonating_user.html
|
||||
# switch_user: true
|
||||
|
||||
# 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: ^/admin, roles: ROLE_ADMIN }
|
||||
# - { path: ^/profile, roles: ROLE_USER }
|
||||
4
api/config/packages/test/framework.yaml
Normal file
4
api/config/packages/test/framework.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
framework:
|
||||
test: true
|
||||
session:
|
||||
storage_id: session.storage.mock_file
|
||||
3
api/config/packages/test/routing.yaml
Normal file
3
api/config/packages/test/routing.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
framework:
|
||||
router:
|
||||
strict_requirements: true
|
||||
3
api/config/packages/test/validator.yaml
Normal file
3
api/config/packages/test/validator.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
framework:
|
||||
validation:
|
||||
not_compromised_password: false
|
||||
6
api/config/packages/test/web_profiler.yaml
Normal file
6
api/config/packages/test/web_profiler.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
web_profiler:
|
||||
toolbar: false
|
||||
intercept_redirects: false
|
||||
|
||||
framework:
|
||||
profiler: { collect: false }
|
||||
4
api/config/packages/twig.yaml
Normal file
4
api/config/packages/twig.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
twig:
|
||||
default_path: '%kernel.project_dir%/templates'
|
||||
debug: '%kernel.debug%'
|
||||
strict_variables: '%kernel.debug%'
|
||||
8
api/config/packages/validator.yaml
Normal file
8
api/config/packages/validator.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
framework:
|
||||
validation:
|
||||
email_validation_mode: html5
|
||||
|
||||
# Enables validator auto-mapping support.
|
||||
# For instance, basic validation constraints will be inferred from Doctrine's metadata.
|
||||
#auto_mapping:
|
||||
# App\Entity\: []
|
||||
Reference in New Issue
Block a user