diff options
author | Nicolas Lœuillet <nicolas@loeuillet.org> | 2015-01-22 08:30:07 +0100 |
---|---|---|
committer | Nicolas Lœuillet <nicolas@loeuillet.org> | 2015-01-22 08:30:07 +0100 |
commit | 93fd4692f6eb753cae16358131c8049d84cfbb41 (patch) | |
tree | 1ef2f66eb378cf419d1aa033a2c772539e60537d /app/config | |
parent | 0440249631164a378981d014bf71b617c082bf5a (diff) | |
download | wallabag-93fd4692f6eb753cae16358131c8049d84cfbb41.tar.gz wallabag-93fd4692f6eb753cae16358131c8049d84cfbb41.tar.zst wallabag-93fd4692f6eb753cae16358131c8049d84cfbb41.zip |
symfony is there
Diffstat (limited to 'app/config')
-rwxr-xr-x | app/config/config.inc.default.php | 4 | ||||
-rw-r--r-- | app/config/config.inc.php | 78 | ||||
-rw-r--r-- | app/config/config.yml | 73 | ||||
-rw-r--r-- | app/config/config_dev.yml | 48 | ||||
-rw-r--r-- | app/config/config_prod.yml | 25 | ||||
-rw-r--r-- | app/config/config_test.yml | 16 | ||||
-rwxr-xr-x | app/config/global.inc.php | 2 | ||||
-rw-r--r-- | app/config/parameters.yml.dist | 20 | ||||
-rw-r--r-- | app/config/routing.yml | 3 | ||||
-rw-r--r-- | app/config/routing_dev.yml | 22 | ||||
-rw-r--r-- | app/config/security.yml | 52 | ||||
-rw-r--r-- | app/config/services.yml | 9 |
12 files changed, 349 insertions, 3 deletions
diff --git a/app/config/config.inc.default.php b/app/config/config.inc.default.php index c837b810..bbce4eab 100755 --- a/app/config/config.inc.default.php +++ b/app/config/config.inc.default.php | |||
@@ -13,7 +13,7 @@ | |||
13 | 13 | ||
14 | @define ('STORAGE', 'sqlite'); # postgres, mysql or sqlite | 14 | @define ('STORAGE', 'sqlite'); # postgres, mysql or sqlite |
15 | 15 | ||
16 | @define ('STORAGE_SQLITE', ROOT . '/app/db/poche.sqlite'); # if you are using sqlite, where me database file is located | 16 | @define ('STORAGE_SQLITE', ROOT . '/data/db/poche.sqlite'); # if you are using sqlite, where me database file is located |
17 | 17 | ||
18 | # only for postgres & mysql | 18 | # only for postgres & mysql |
19 | @define ('STORAGE_SERVER', 'localhost'); | 19 | @define ('STORAGE_SERVER', 'localhost'); |
@@ -62,7 +62,7 @@ | |||
62 | @define ('SHOW_PRINTLINK', '1'); | 62 | @define ('SHOW_PRINTLINK', '1'); |
63 | // display or not percent of read in article view. Affects only default theme. | 63 | // display or not percent of read in article view. Affects only default theme. |
64 | @define ('SHOW_READPERCENT', '1'); | 64 | @define ('SHOW_READPERCENT', '1'); |
65 | @define ('ABS_PATH', ROOT . '/app/assets/'); | 65 | @define ('ABS_PATH', ROOT . '/data/assets/'); |
66 | 66 | ||
67 | @define ('DEFAULT_THEME', 'baggy'); | 67 | @define ('DEFAULT_THEME', 'baggy'); |
68 | 68 | ||
diff --git a/app/config/config.inc.php b/app/config/config.inc.php new file mode 100644 index 00000000..405b9537 --- /dev/null +++ b/app/config/config.inc.php | |||
@@ -0,0 +1,78 @@ | |||
1 | <?php | ||
2 | /** | ||
3 | * wallabag, self hostable application allowing you to not miss any content anymore | ||
4 | * | ||
5 | * @category wallabag | ||
6 | * @author Nicolas Lœuillet <nicolas@loeuillet.org> | ||
7 | * @copyright 2013 | ||
8 | * @license http://opensource.org/licenses/MIT see COPYING file | ||
9 | */ | ||
10 | |||
11 | @define ('SALT', 'ThisTokenIsNotSoSecretChangeIt'); # put a strong string here | ||
12 | @define ('LANG', 'en_EN.utf8'); | ||
13 | |||
14 | @define ('STORAGE', 'sqlite'); # postgres, mysql or sqlite | ||
15 | |||
16 | @define ('STORAGE_SQLITE', ROOT . '/data/db/poche.sqlite'); # if you are using sqlite, where me database file is located | ||
17 | |||
18 | # only for postgres & mysql | ||
19 | @define ('STORAGE_SERVER', 'localhost'); | ||
20 | @define ('STORAGE_DB', 'poche'); | ||
21 | @define ('STORAGE_USER', 'poche'); | ||
22 | @define ('STORAGE_PASSWORD', 'poche'); | ||
23 | |||
24 | ################################################################################# | ||
25 | # Do not trespass unless you know what you are doing | ||
26 | ################################################################################# | ||
27 | // Change this if http is running on nonstandard port - i.e is behind cache proxy | ||
28 | @define ('HTTP_PORT', 80); | ||
29 | |||
30 | // Change this if not using the standart port for SSL - i.e you server is behind sslh | ||
31 | @define ('SSL_PORT', 443); | ||
32 | |||
33 | @define ('MODE_DEMO', FALSE); | ||
34 | @define ('DEBUG_POCHE', FALSE); | ||
35 | |||
36 | //default level of error reporting in application. Developers should override it in their config.inc.php: set to E_ALL. | ||
37 | @define ('ERROR_REPORTING', E_ALL & ~E_NOTICE); | ||
38 | |||
39 | @define ('DOWNLOAD_PICTURES', FALSE); # This can slow down the process of adding articles | ||
40 | @define ('REGENERATE_PICTURES_QUALITY', 75); | ||
41 | @define ('CONVERT_LINKS_FOOTNOTES', FALSE); | ||
42 | @define ('REVERT_FORCED_PARAGRAPH_ELEMENTS', FALSE); | ||
43 | @define ('SHARE_TWITTER', TRUE); | ||
44 | @define ('SHARE_MAIL', TRUE); | ||
45 | @define ('SHARE_SHAARLI', FALSE); | ||
46 | @define ('SHAARLI_URL', 'http://myshaarliurl.com'); | ||
47 | @define ('SHARE_DIASPORA', FALSE); | ||
48 | @define ('DIASPORA_URL', 'http://diasporapod.com'); # Don't add a / at the end | ||
49 | @define ('FLATTR', TRUE); | ||
50 | @define ('FLATTR_API', 'https://api.flattr.com/rest/v2/things/lookup/?url='); | ||
51 | @define ('NOT_FLATTRABLE', '0'); | ||
52 | @define ('FLATTRABLE', '1'); | ||
53 | @define ('FLATTRED', '2'); | ||
54 | @define ('CARROT', FALSE); | ||
55 | |||
56 | // ebook | ||
57 | @define ('EPUB', TRUE); | ||
58 | @define ('MOBI', FALSE); | ||
59 | @define ('PDF', FALSE); | ||
60 | |||
61 | // display or not print link in article view | ||
62 | @define ('SHOW_PRINTLINK', '1'); | ||
63 | // display or not percent of read in article view. Affects only default theme. | ||
64 | @define ('SHOW_READPERCENT', '1'); | ||
65 | @define ('ABS_PATH', ROOT . '/data/assets/'); | ||
66 | |||
67 | @define ('DEFAULT_THEME', 'baggy'); | ||
68 | |||
69 | @define ('THEME', ROOT . '/src/Wallabag/Wallabag/Resources/views'); | ||
70 | @define ('LOCALE', ROOT . '/src/Wallabag/Wallabag/Resources/translations'); | ||
71 | @define ('CACHE', ROOT . '/app/cache'); | ||
72 | |||
73 | @define ('PAGINATION', '12'); | ||
74 | |||
75 | //limit for download of articles during import | ||
76 | @define ('IMPORT_LIMIT', 5); | ||
77 | //delay between downloads (in sec) | ||
78 | @define ('IMPORT_DELAY', 5); | ||
diff --git a/app/config/config.yml b/app/config/config.yml new file mode 100644 index 00000000..25f66471 --- /dev/null +++ b/app/config/config.yml | |||
@@ -0,0 +1,73 @@ | |||
1 | imports: | ||
2 | - { resource: parameters.yml } | ||
3 | - { resource: security.yml } | ||
4 | - { resource: services.yml } | ||
5 | |||
6 | framework: | ||
7 | #esi: ~ | ||
8 | #translator: { fallback: "%locale%" } | ||
9 | secret: "%secret%" | ||
10 | router: | ||
11 | resource: "%kernel.root_dir%/config/routing.yml" | ||
12 | strict_requirements: ~ | ||
13 | form: ~ | ||
14 | csrf_protection: ~ | ||
15 | validation: { enable_annotations: true } | ||
16 | templating: | ||
17 | engines: ['twig'] | ||
18 | #assets_version: SomeVersionScheme | ||
19 | default_locale: "%locale%" | ||
20 | trusted_hosts: ~ | ||
21 | trusted_proxies: ~ | ||
22 | session: | ||
23 | # handler_id set to null will use default session handler from php.ini | ||
24 | handler_id: ~ | ||
25 | fragments: ~ | ||
26 | http_method_override: true | ||
27 | |||
28 | # Twig Configuration | ||
29 | twig: | ||
30 | debug: "%kernel.debug%" | ||
31 | strict_variables: "%kernel.debug%" | ||
32 | |||
33 | # Assetic Configuration | ||
34 | assetic: | ||
35 | debug: "%kernel.debug%" | ||
36 | use_controller: false | ||
37 | bundles: [ ] | ||
38 | #java: /usr/bin/java | ||
39 | filters: | ||
40 | cssrewrite: ~ | ||
41 | #closure: | ||
42 | # jar: "%kernel.root_dir%/Resources/java/compiler.jar" | ||
43 | #yui_css: | ||
44 | # jar: "%kernel.root_dir%/Resources/java/yuicompressor-2.4.7.jar" | ||
45 | |||
46 | # Doctrine Configuration | ||
47 | doctrine: | ||
48 | dbal: | ||
49 | driver: "%database_driver%" | ||
50 | host: "%database_host%" | ||
51 | port: "%database_port%" | ||
52 | dbname: "%database_name%" | ||
53 | user: "%database_user%" | ||
54 | password: "%database_password%" | ||
55 | charset: UTF8 | ||
56 | # if using pdo_sqlite as your database driver: | ||
57 | # 1. add the path in parameters.yml | ||
58 | # e.g. database_path: "%kernel.root_dir%/data/data.db3" | ||
59 | # 2. Uncomment database_path in parameters.yml.dist | ||
60 | # 3. Uncomment next line: | ||
61 | # path: "%database_path%" | ||
62 | |||
63 | orm: | ||
64 | auto_generate_proxy_classes: "%kernel.debug%" | ||
65 | auto_mapping: true | ||
66 | |||
67 | # Swiftmailer Configuration | ||
68 | swiftmailer: | ||
69 | transport: "%mailer_transport%" | ||
70 | host: "%mailer_host%" | ||
71 | username: "%mailer_user%" | ||
72 | password: "%mailer_password%" | ||
73 | spool: { type: memory } | ||
diff --git a/app/config/config_dev.yml b/app/config/config_dev.yml new file mode 100644 index 00000000..efaf396e --- /dev/null +++ b/app/config/config_dev.yml | |||
@@ -0,0 +1,48 @@ | |||
1 | imports: | ||
2 | - { resource: config.yml } | ||
3 | |||
4 | framework: | ||
5 | router: | ||
6 | resource: "%kernel.root_dir%/config/routing_dev.yml" | ||
7 | strict_requirements: true | ||
8 | profiler: { only_exceptions: false } | ||
9 | |||
10 | web_profiler: | ||
11 | toolbar: true | ||
12 | intercept_redirects: false | ||
13 | |||
14 | monolog: | ||
15 | handlers: | ||
16 | main: | ||
17 | type: stream | ||
18 | path: "%kernel.logs_dir%/%kernel.environment%.log" | ||
19 | level: debug | ||
20 | console: | ||
21 | type: console | ||
22 | bubble: false | ||
23 | verbosity_levels: | ||
24 | VERBOSITY_VERBOSE: INFO | ||
25 | VERBOSITY_VERY_VERBOSE: DEBUG | ||
26 | channels: ["!doctrine"] | ||
27 | console_very_verbose: | ||
28 | type: console | ||
29 | bubble: false | ||
30 | verbosity_levels: | ||
31 | VERBOSITY_VERBOSE: NOTICE | ||
32 | VERBOSITY_VERY_VERBOSE: NOTICE | ||
33 | VERBOSITY_DEBUG: DEBUG | ||
34 | channels: ["doctrine"] | ||
35 | # uncomment to get logging in your browser | ||
36 | # you may have to allow bigger header sizes in your Web server configuration | ||
37 | #firephp: | ||
38 | # type: firephp | ||
39 | # level: info | ||
40 | #chromephp: | ||
41 | # type: chromephp | ||
42 | # level: info | ||
43 | |||
44 | assetic: | ||
45 | use_controller: true | ||
46 | |||
47 | #swiftmailer: | ||
48 | # delivery_address: me@example.com | ||
diff --git a/app/config/config_prod.yml b/app/config/config_prod.yml new file mode 100644 index 00000000..342837a0 --- /dev/null +++ b/app/config/config_prod.yml | |||
@@ -0,0 +1,25 @@ | |||
1 | imports: | ||
2 | - { resource: config.yml } | ||
3 | |||
4 | #framework: | ||
5 | # validation: | ||
6 | # cache: apc | ||
7 | |||
8 | #doctrine: | ||
9 | # orm: | ||
10 | # metadata_cache_driver: apc | ||
11 | # result_cache_driver: apc | ||
12 | # query_cache_driver: apc | ||
13 | |||
14 | monolog: | ||
15 | handlers: | ||
16 | main: | ||
17 | type: fingers_crossed | ||
18 | action_level: error | ||
19 | handler: nested | ||
20 | nested: | ||
21 | type: stream | ||
22 | path: "%kernel.logs_dir%/%kernel.environment%.log" | ||
23 | level: debug | ||
24 | console: | ||
25 | type: console | ||
diff --git a/app/config/config_test.yml b/app/config/config_test.yml new file mode 100644 index 00000000..2f6d9250 --- /dev/null +++ b/app/config/config_test.yml | |||
@@ -0,0 +1,16 @@ | |||
1 | imports: | ||
2 | - { resource: config_dev.yml } | ||
3 | |||
4 | framework: | ||
5 | test: ~ | ||
6 | session: | ||
7 | storage_id: session.storage.mock_file | ||
8 | profiler: | ||
9 | collect: false | ||
10 | |||
11 | web_profiler: | ||
12 | toolbar: false | ||
13 | intercept_redirects: false | ||
14 | |||
15 | swiftmailer: | ||
16 | disable_delivery: true | ||
diff --git a/app/config/global.inc.php b/app/config/global.inc.php index 59db5aa1..8e62818b 100755 --- a/app/config/global.inc.php +++ b/app/config/global.inc.php | |||
@@ -22,4 +22,4 @@ if (!ini_get('date.timezone') || !@date_default_timezone_set(ini_get('date.timez | |||
22 | 22 | ||
23 | if (defined('ERROR_REPORTING')) { | 23 | if (defined('ERROR_REPORTING')) { |
24 | error_reporting(ERROR_REPORTING); | 24 | error_reporting(ERROR_REPORTING); |
25 | } \ No newline at end of file | 25 | } |
diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist new file mode 100644 index 00000000..1da778f4 --- /dev/null +++ b/app/config/parameters.yml.dist | |||
@@ -0,0 +1,20 @@ | |||
1 | # This file is a "template" of what your parameters.yml file should look like | ||
2 | parameters: | ||
3 | database_driver: pdo_mysql | ||
4 | database_host: 127.0.0.1 | ||
5 | database_port: ~ | ||
6 | database_name: symfony | ||
7 | database_user: root | ||
8 | database_password: ~ | ||
9 | # You should uncomment this if you want use pdo_sqlite | ||
10 | # database_path: "%kernel.root_dir%/data.db3" | ||
11 | |||
12 | mailer_transport: smtp | ||
13 | mailer_host: 127.0.0.1 | ||
14 | mailer_user: ~ | ||
15 | mailer_password: ~ | ||
16 | |||
17 | locale: en | ||
18 | |||
19 | # A secret key that's used to generate certain security-related tokens | ||
20 | secret: ThisTokenIsNotSoSecretChangeIt | ||
diff --git a/app/config/routing.yml b/app/config/routing.yml new file mode 100644 index 00000000..a748d532 --- /dev/null +++ b/app/config/routing.yml | |||
@@ -0,0 +1,3 @@ | |||
1 | app: | ||
2 | resource: @WallabagBundle/Controller/ | ||
3 | type: annotation | ||
diff --git a/app/config/routing_dev.yml b/app/config/routing_dev.yml new file mode 100644 index 00000000..99130058 --- /dev/null +++ b/app/config/routing_dev.yml | |||
@@ -0,0 +1,22 @@ | |||
1 | _wdt: | ||
2 | resource: "@WebProfilerBundle/Resources/config/routing/wdt.xml" | ||
3 | prefix: /_wdt | ||
4 | |||
5 | _profiler: | ||
6 | resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml" | ||
7 | prefix: /_profiler | ||
8 | |||
9 | _configurator: | ||
10 | resource: "@SensioDistributionBundle/Resources/config/routing/webconfigurator.xml" | ||
11 | prefix: /_configurator | ||
12 | |||
13 | _errors: | ||
14 | resource: "@TwigBundle/Resources/config/routing/errors.xml" | ||
15 | prefix: /_error | ||
16 | |||
17 | _main: | ||
18 | resource: routing.yml | ||
19 | |||
20 | # AcmeDemoBundle routes (to be removed) | ||
21 | _acme_demo: | ||
22 | resource: "@AcmeDemoBundle/Resources/config/routing.yml" \ No newline at end of file | ||
diff --git a/app/config/security.yml b/app/config/security.yml new file mode 100644 index 00000000..a28b1db9 --- /dev/null +++ b/app/config/security.yml | |||
@@ -0,0 +1,52 @@ | |||
1 | # you can read more about security in the related section of the documentation | ||
2 | # http://symfony.com/doc/current/book/security.html | ||
3 | security: | ||
4 | # http://symfony.com/doc/current/book/security.html#encoding-the-user-s-password | ||
5 | encoders: | ||
6 | Symfony\Component\Security\Core\User\User: plaintext | ||
7 | |||
8 | # http://symfony.com/doc/current/book/security.html#hierarchical-roles | ||
9 | role_hierarchy: | ||
10 | ROLE_ADMIN: ROLE_USER | ||
11 | ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH] | ||
12 | |||
13 | # http://symfony.com/doc/current/book/security.html#where-do-users-come-from-user-providers | ||
14 | providers: | ||
15 | in_memory: | ||
16 | memory: | ||
17 | users: | ||
18 | user: { password: userpass, roles: [ 'ROLE_USER' ] } | ||
19 | admin: { password: adminpass, roles: [ 'ROLE_ADMIN' ] } | ||
20 | |||
21 | # the main part of the security, where you can set up firewalls | ||
22 | # for specific sections of your app | ||
23 | firewalls: | ||
24 | # disables authentication for assets and the profiler, adapt it according to your needs | ||
25 | dev: | ||
26 | pattern: ^/(_(profiler|wdt)|css|images|js)/ | ||
27 | security: false | ||
28 | # the login page has to be accessible for everybody | ||
29 | demo_login: | ||
30 | pattern: ^/demo/secured/login$ | ||
31 | security: false | ||
32 | |||
33 | # secures part of the application | ||
34 | demo_secured_area: | ||
35 | pattern: ^/demo/secured/ | ||
36 | # it's important to notice that in this case _demo_security_check and _demo_login | ||
37 | # are route names and that they are specified in the AcmeDemoBundle | ||
38 | form_login: | ||
39 | check_path: _demo_security_check | ||
40 | login_path: _demo_login | ||
41 | logout: | ||
42 | path: _demo_logout | ||
43 | target: _demo | ||
44 | #anonymous: ~ | ||
45 | #http_basic: | ||
46 | # realm: "Secured Demo Area" | ||
47 | |||
48 | # with these settings you can restrict or allow access for different parts | ||
49 | # of your application based on roles, ip, host or methods | ||
50 | # http://symfony.com/doc/current/cookbook/security/access_control.html | ||
51 | access_control: | ||
52 | #- { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY, requires_channel: https } \ No newline at end of file | ||
diff --git a/app/config/services.yml b/app/config/services.yml new file mode 100644 index 00000000..5c76fc59 --- /dev/null +++ b/app/config/services.yml | |||
@@ -0,0 +1,9 @@ | |||
1 | # Learn more about services, parameters and containers at | ||
2 | # http://symfony.com/doc/current/book/service_container.html | ||
3 | parameters: | ||
4 | # parameter_name: value | ||
5 | |||
6 | services: | ||
7 | # service_name: | ||
8 | # class: AppBundle\Directory\ClassName | ||
9 | # arguments: ["@another_service_name", "plain_value", "%parameter_name%"] | ||