Init
This commit is contained in:
33
config/app/parameters.neon
Normal file
33
config/app/parameters.neon
Normal file
@@ -0,0 +1,33 @@
|
||||
# Parameters
|
||||
#
|
||||
parameters:
|
||||
|
||||
# System
|
||||
system:
|
||||
error:
|
||||
email: dev@dev.dev
|
||||
presenter: Front:Error
|
||||
|
||||
# Database
|
||||
database:
|
||||
driver: pdo_pgsql
|
||||
port: 5432
|
||||
|
||||
# Project
|
||||
project:
|
||||
rev: "1.0.0"
|
||||
|
||||
# File
|
||||
files:
|
||||
root: %appDir%/../data/files
|
||||
|
||||
# Mailing
|
||||
mailing:
|
||||
from: webapp@localhost
|
||||
from_name: Webapp
|
||||
|
||||
# STMP
|
||||
smtp:
|
||||
host: localhost
|
||||
username: fake
|
||||
password: fake
|
||||
50
config/app/services.neon
Normal file
50
config/app/services.neon
Normal file
@@ -0,0 +1,50 @@
|
||||
# Services
|
||||
#
|
||||
services:
|
||||
# Forms
|
||||
- App\UI\Form\FormFactory
|
||||
|
||||
|
||||
# Latte/Templates
|
||||
latte.latteFactory:
|
||||
setup:
|
||||
- addFilter(datetime, App\Model\Latte\Filters::datetime)
|
||||
- addFilter(neon, App\Model\Latte\Filters::neon)
|
||||
- addFilter(json, App\Model\Latte\Filters::json)
|
||||
|
||||
latte.templateFactory:
|
||||
class: App\Model\Latte\TemplateFactory
|
||||
|
||||
|
||||
# Security ================
|
||||
nette.userStorage:
|
||||
setup:
|
||||
- setNamespace("Webapp")
|
||||
|
||||
security.passwords: App\Model\Security\Passwords
|
||||
security.user: App\Model\Security\SecurityUser
|
||||
security.authenticator: App\Model\Security\Authenticator\UserAuthenticator
|
||||
security.authorizator: App\Model\Security\Authorizator\StaticAuthorizator
|
||||
|
||||
|
||||
# Routing ================
|
||||
- App\Model\Router\RouterFactory
|
||||
router:
|
||||
class: Nette\Application\IRouter
|
||||
factory: @App\Model\Router\RouterFactory::create
|
||||
|
||||
|
||||
# Domain =================
|
||||
- App\Domain\User\CreateUserFacade
|
||||
# - App\Domain\Order\OrderLogSubscriber
|
||||
# - App\Domain\Http\RequestLoggerSubscriber
|
||||
|
||||
|
||||
# Console ================
|
||||
- {class: App\Model\Console\HelloCommand, tags: {console.command: hello}}
|
||||
|
||||
|
||||
|
||||
latte:
|
||||
macros:
|
||||
- App\Model\Latte\Macros::register
|
||||
50
config/env/base.neon
vendored
Normal file
50
config/env/base.neon
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
# Core Config
|
||||
includes:
|
||||
# Application
|
||||
- ../app/parameters.neon
|
||||
- ../app/services.neon
|
||||
|
||||
# Extensions
|
||||
- ../ext/contributte.neon
|
||||
- ../ext/nettrine.neon
|
||||
|
||||
php:
|
||||
date.timezone: Europe/Prague
|
||||
output_buffering: 4096
|
||||
|
||||
# Nette section
|
||||
session:
|
||||
autoStart: smart
|
||||
#cookieDomain: '?->getUrl()->getDomain(4)'(@Nette\Http\IRequest)
|
||||
cookieHttponly: true
|
||||
#cookiePath: '?->getUrl()->getBasePath()'(@Nette\Http\IRequest) # Cookie path same as $basePath
|
||||
cookieSamesite: Lax
|
||||
debugger: false
|
||||
expiration: 1 year
|
||||
name: SID
|
||||
#savePath: %tempDir%/session
|
||||
sidBitsPerCharacter: 6 # 4-6
|
||||
sidLength: 128 # 22-250
|
||||
useCookies: true
|
||||
useOnlyCookies: true
|
||||
useStrictMode: true
|
||||
|
||||
http:
|
||||
cookieSecure: auto
|
||||
|
||||
application:
|
||||
catchExceptions: %productionMode%
|
||||
errorPresenter: %system.error.presenter%
|
||||
mapping:
|
||||
Admin: [App\Modules\Admin, *, *\*Presenter]
|
||||
Front: [App\Modules\Front, *, *\*Presenter]
|
||||
Mailing: [App\Modules\Mailing, *, *\*Presenter]
|
||||
Pdf: [App\Modules\Pdf, *, *\*Presenter]
|
||||
|
||||
di:
|
||||
debugger: true
|
||||
|
||||
tracy:
|
||||
email: %system.error.email%
|
||||
logSeverity: E_ALL
|
||||
strictMode: yes
|
||||
13
config/env/dev.neon
vendored
Normal file
13
config/env/dev.neon
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
# Development Config
|
||||
includes:
|
||||
- base.neon
|
||||
|
||||
|
||||
# Nettrine ===================
|
||||
nettrine.cache:
|
||||
# driver: Doctrine\Common\Cache\ApcuCache
|
||||
|
||||
|
||||
# Services ===================
|
||||
services:
|
||||
# mail.mailer: Contributte\Mail\Mailer\TraceableMailer(Contributte\Mail\Mailer\FileMailer(%tempDir%/mails))
|
||||
3
config/env/prod.neon
vendored
Normal file
3
config/env/prod.neon
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# Production Config
|
||||
includes:
|
||||
- base.neon
|
||||
31
config/env/test.neon
vendored
Normal file
31
config/env/test.neon
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
# Test Config
|
||||
includes:
|
||||
- base.neon
|
||||
|
||||
|
||||
# Post/Mailing ===============
|
||||
contributte.post:
|
||||
|
||||
# Nettrine ===================
|
||||
nettrine.orm:
|
||||
configuration:
|
||||
autoGenerateProxyClasses: ::constant(Doctrine\Common\Proxy\AbstractProxyFactory::AUTOGENERATE_FILE_NOT_EXISTS)
|
||||
|
||||
nettrine.cache:
|
||||
driver: Doctrine\Common\Cache\ArrayCache
|
||||
|
||||
|
||||
# Services ===================
|
||||
services:
|
||||
security.userStorage: Tests\Toolkit\Nette\DummyUserStorage
|
||||
|
||||
mail.mailer: Contributte\Mail\Mailer\FileMailer(%appDir%/../tests/tmp/mails)
|
||||
|
||||
# Parameters =================
|
||||
parameters:
|
||||
database:
|
||||
driver: pdo_sqlite
|
||||
host: test
|
||||
dbname: test
|
||||
user: test
|
||||
password: test
|
||||
40
config/ext/contributte.neon
Normal file
40
config/ext/contributte.neon
Normal file
@@ -0,0 +1,40 @@
|
||||
# Extension > Contributte
|
||||
#
|
||||
extensions:
|
||||
contributte.console: Contributte\Console\DI\ConsoleExtension(%consoleMode%)
|
||||
contributte.console.extra: Contributte\Console\Extra\DI\ConsoleBridgesExtension(%consoleMode%)
|
||||
contributte.events: Contributte\EventDispatcher\DI\EventDispatcherExtension
|
||||
contributte.events2nette: Contributte\Events\Extra\DI\EventBridgesExtension
|
||||
contributte.monolog: Contributte\Monolog\DI\MonologExtension
|
||||
contributte.mailing: Contributte\Mailing\DI\MailingExtension
|
||||
contributte.post: Contributte\Mail\DI\MailExtension
|
||||
|
||||
contributte.console:
|
||||
url: http://localhost/
|
||||
lazy: true
|
||||
|
||||
contributte.mailing:
|
||||
template:
|
||||
config:
|
||||
layout: %appDir%/resources/mail/@layout.latte
|
||||
|
||||
contributte.monolog:
|
||||
holder:
|
||||
enabled: true
|
||||
hook:
|
||||
toTracy: false
|
||||
channel:
|
||||
default:
|
||||
handlers:
|
||||
- Monolog\Handler\RotatingFileHandler(%appDir%/../log/syslog.log, 30, Monolog\Logger::WARNING)
|
||||
processors:
|
||||
- Monolog\Processor\WebProcessor()
|
||||
- Monolog\Processor\IntrospectionProcessor()
|
||||
- Monolog\Processor\MemoryPeakUsageProcessor()
|
||||
- Monolog\Processor\ProcessIdProcessor()
|
||||
|
||||
services:
|
||||
-
|
||||
factory: Contributte\PdfResponse\PdfResponse
|
||||
setup:
|
||||
- $mpdfConfig([tempDir: %tempDir%/mpdf])
|
||||
62
config/ext/nettrine.neon
Normal file
62
config/ext/nettrine.neon
Normal file
@@ -0,0 +1,62 @@
|
||||
# Extension > Nettrine
|
||||
#
|
||||
extensions:
|
||||
nettrine.annotations: Nettrine\Annotations\DI\AnnotationsExtension
|
||||
nettrine.cache: Nettrine\Cache\DI\CacheExtension
|
||||
nettrine.migrations: Nettrine\Migrations\DI\MigrationsExtension
|
||||
nettrine.fixtures: Nettrine\Fixtures\DI\FixturesExtension
|
||||
|
||||
# Dbal
|
||||
nettrine.dbal: Nettrine\DBAL\DI\DbalExtension
|
||||
nettrine.dbal.console: Nettrine\DBAL\DI\DbalConsoleExtension(%consoleMode%)
|
||||
|
||||
# Orm
|
||||
nettrine.orm: Nettrine\ORM\DI\OrmExtension
|
||||
nettrine.orm.cache: Nettrine\ORM\DI\OrmCacheExtension
|
||||
nettrine.orm.console: Nettrine\ORM\DI\OrmConsoleExtension(%consoleMode%)
|
||||
nettrine.orm.annotations: Nettrine\ORM\DI\OrmAnnotationsExtension
|
||||
|
||||
nettrine.dbal:
|
||||
debug:
|
||||
panel: %debugMode%
|
||||
configuration:
|
||||
sqlLogger: Nettrine\DBAL\Logger\PsrLogger(@Monolog\Logger)
|
||||
connection:
|
||||
driver: %database.driver%
|
||||
host: %database.host%
|
||||
user: %database.user%
|
||||
password: %database.password%
|
||||
dbname: %database.dbname%
|
||||
port: %database.port%
|
||||
|
||||
nettrine.orm:
|
||||
entityManagerDecoratorClass: App\Model\Database\EntityManager
|
||||
configuration:
|
||||
autoGenerateProxyClasses: %debugMode%
|
||||
|
||||
nettrine.orm.annotations:
|
||||
mapping:
|
||||
App\Model\Database\Entity: %appDir%/model/Database/Entity
|
||||
|
||||
nettrine.orm.cache:
|
||||
|
||||
nettrine.cache:
|
||||
# driver: Doctrine\Common\Cache\ApcuCache
|
||||
|
||||
nettrine.migrations:
|
||||
table: doctrine_migrations
|
||||
column: version
|
||||
directory: %rootDir%/db/Migrations
|
||||
namespace: Database\Migrations
|
||||
versionsOrganization: null
|
||||
|
||||
nettrine.fixtures:
|
||||
paths:
|
||||
- %rootDir%/db/Fixtures
|
||||
|
||||
decorator:
|
||||
Doctrine\Common\EventSubscriber:
|
||||
tags: [nettrine.subscriber]
|
||||
|
||||
services:
|
||||
- Nettrine\Migrations\Subscriber\FixPostgreSQLDefaultSchemaSubscriber
|
||||
22
config/local.neon.dist
Normal file
22
config/local.neon.dist
Normal file
@@ -0,0 +1,22 @@
|
||||
# Host Config
|
||||
parameters:
|
||||
|
||||
# Database
|
||||
database:
|
||||
host: database
|
||||
dbname: webapp
|
||||
user: webapp
|
||||
password: webapp
|
||||
|
||||
# For 0.0.0.0 instead of localhost
|
||||
# php -S 0.0.0.0:8000 -t www
|
||||
# session:
|
||||
# cookieDomain: "?->getUrl()->getDomain(4)"(@Nette\Http\IRequest)
|
||||
|
||||
# STMP server
|
||||
# E.q. mailtrap is cool.
|
||||
# smtp:
|
||||
# host: smtp.mailtrap.io
|
||||
# username: "***"
|
||||
# password: ***
|
||||
# port: 2525
|
||||
Reference in New Issue
Block a user