aboutsummaryrefslogtreecommitdiffhomepage
path: root/app/config
diff options
context:
space:
mode:
Diffstat (limited to 'app/config')
-rw-r--r--app/config/config.yml40
-rw-r--r--app/config/config_prod.yml6
-rw-r--r--app/config/config_test.yml3
-rw-r--r--app/config/parameters.yml.dist16
-rw-r--r--app/config/parameters_test.yml3
-rw-r--r--app/config/security.yml2
-rw-r--r--app/config/services.yml8
-rw-r--r--app/config/tests/parameters_test.mysql.yml1
-rw-r--r--app/config/tests/parameters_test.pgsql.yml1
-rw-r--r--app/config/tests/parameters_test.sqlite.yml5
-rw-r--r--app/config/wallabag.yml161
-rw-r--r--app/config/webpack/common.js40
-rw-r--r--app/config/webpack/dev.js61
-rw-r--r--app/config/webpack/prod.js99
14 files changed, 398 insertions, 48 deletions
diff --git a/app/config/config.yml b/app/config/config.yml
index 77cda052..2bc5e3b3 100644
--- a/app/config/config.yml
+++ b/app/config/config.yml
@@ -2,6 +2,12 @@ imports:
2 - { resource: parameters.yml } 2 - { resource: parameters.yml }
3 - { resource: security.yml } 3 - { resource: security.yml }
4 - { resource: services.yml } 4 - { resource: services.yml }
5 - { resource: wallabag.yml }
6
7parameters:
8 # Allows to use the live reload feature for changes in assets
9 use_webpack_dev_server: false
10 craue_config.cache_adapter.class: Craue\ConfigBundle\CacheAdapter\SymfonyCacheComponentAdapter
5 11
6framework: 12framework:
7 #esi: ~ 13 #esi: ~
@@ -29,40 +35,6 @@ framework:
29 http_method_override: true 35 http_method_override: true
30 assets: ~ 36 assets: ~
31 37
32wallabag_core:
33 version: 2.2.3
34 paypal_url: "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UBA65LG3FX9Y&lc=gb"
35 languages:
36 en: 'English'
37 fr: 'Français'
38 de: 'Deutsch'
39 tr: 'Türkçe'
40 fa: 'فارسی'
41 ro: 'Română'
42 pl: 'Polish'
43 da: 'Dansk'
44 es: 'Español'
45 oc: 'Occitan'
46 it: 'Italiano'
47 pt: 'Português'
48 items_on_page: 12
49 theme: material
50 language: '%locale%'
51 rss_limit: 50
52 reading_speed: 1
53 cache_lifetime: 10
54 action_mark_as_read: 1
55 list_mode: 1
56 fetching_error_message: |
57 wallabag can't retrieve contents for this article. Please <a href="http://doc.wallabag.org/en/user/errors_during_fetching.html#how-can-i-help-to-fix-that">troubleshoot this issue</a>.
58
59wallabag_user:
60 registration_enabled: "%fosuser_registration%"
61
62wallabag_import:
63 allow_mimetypes: ['application/octet-stream', 'application/json', 'text/plain', 'text/csv']
64 resource_dir: "%kernel.root_dir%/../web/uploads/import"
65
66# Twig Configuration 38# Twig Configuration
67twig: 39twig:
68 debug: "%kernel.debug%" 40 debug: "%kernel.debug%"
diff --git a/app/config/config_prod.yml b/app/config/config_prod.yml
index 5a4dd69e..65b02d66 100644
--- a/app/config/config_prod.yml
+++ b/app/config/config_prod.yml
@@ -1,9 +1,9 @@
1imports: 1imports:
2 - { resource: config.yml } 2 - { resource: config.yml }
3 3
4#framework: 4framework:
5# cache: 5 assets:
6# system: cache.adapter.apcu 6 # json_manifest_path: '%kernel.root_dir%/../web/bundles/wallabagcore/manifest.json'
7 7
8#doctrine: 8#doctrine:
9# orm: 9# orm:
diff --git a/app/config/config_test.yml b/app/config/config_test.yml
index f5e2c25e..c620c359 100644
--- a/app/config/config_test.yml
+++ b/app/config/config_test.yml
@@ -29,7 +29,8 @@ doctrine:
29 user: "%test_database_user%" 29 user: "%test_database_user%"
30 password: "%test_database_password%" 30 password: "%test_database_password%"
31 charset: "%test_database_charset%" 31 charset: "%test_database_charset%"
32 path: "%test_database_path%" 32 path: "%env(TEST_DATABASE_PATH)%"
33
33 orm: 34 orm:
34 metadata_cache_driver: 35 metadata_cache_driver:
35 type: service 36 type: service
diff --git a/app/config/parameters.yml.dist b/app/config/parameters.yml.dist
index 97f51ed1..b3fe11c8 100644
--- a/app/config/parameters.yml.dist
+++ b/app/config/parameters.yml.dist
@@ -10,17 +10,20 @@ parameters:
10 # database_user: %env.database_user% 10 # database_user: %env.database_user%
11 # database_password: %env.database_password% 11 # database_password: %env.database_password%
12 12
13 database_driver: pdo_sqlite 13 database_driver: pdo_mysql
14 database_host: 127.0.0.1 14 database_host: 127.0.0.1
15 database_port: ~ 15 database_port: ~
16 database_name: symfony 16 database_name: wallabag
17 database_user: root 17 database_user: root
18 database_password: ~ 18 database_password: ~
19 database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite" 19 # For SQLite, database_path should be "%kernel.root_dir%/../data/db/wallabag.sqlite"
20 database_path: null
20 database_table_prefix: wallabag_ 21 database_table_prefix: wallabag_
21 database_socket: null 22 database_socket: null
22 # with MySQL, use "utf8mb4" if you got problem with content with emojis 23 # with PostgreSQL and SQLite, you must set "utf8"
23 database_charset: utf8 24 database_charset: utf8mb4
25
26 domain_name: https://your-wallabag-url-instance.com
24 27
25 mailer_transport: smtp 28 mailer_transport: smtp
26 mailer_host: 127.0.0.1 29 mailer_host: 127.0.0.1
@@ -57,6 +60,3 @@ parameters:
57 redis_port: 6379 60 redis_port: 6379
58 redis_path: null 61 redis_path: null
59 redis_password: null 62 redis_password: null
60
61 # sites credentials
62 sites_credentials: {}
diff --git a/app/config/parameters_test.yml b/app/config/parameters_test.yml
index 5f2e25bb..010785e6 100644
--- a/app/config/parameters_test.yml
+++ b/app/config/parameters_test.yml
@@ -5,5 +5,6 @@ parameters:
5 test_database_name: null 5 test_database_name: null
6 test_database_user: null 6 test_database_user: null
7 test_database_password: null 7 test_database_password: null
8 test_database_path: '%kernel.root_dir%/../data/db/wallabag_test.sqlite' 8 test_database_path: "%env(TEST_DATABASE_PATH)%"
9 env(TEST_DATABASE_PATH): "%kernel.root_dir%/../data/db/wallabag_test.sqlite"
9 test_database_charset: utf8 10 test_database_charset: utf8
diff --git a/app/config/security.yml b/app/config/security.yml
index efb00a53..e14a0bd1 100644
--- a/app/config/security.yml
+++ b/app/config/security.yml
@@ -56,10 +56,12 @@ security:
56 access_control: 56 access_control:
57 - { path: ^/api/doc, roles: IS_AUTHENTICATED_ANONYMOUSLY } 57 - { path: ^/api/doc, roles: IS_AUTHENTICATED_ANONYMOUSLY }
58 - { path: ^/api/version, roles: IS_AUTHENTICATED_ANONYMOUSLY } 58 - { path: ^/api/version, roles: IS_AUTHENTICATED_ANONYMOUSLY }
59 - { path: ^/api/user, roles: IS_AUTHENTICATED_ANONYMOUSLY }
59 - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY } 60 - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
60 - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY } 61 - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
61 - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY } 62 - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
62 - { path: /(unread|starred|archive).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY } 63 - { path: /(unread|starred|archive).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
64 - { path: /tags/(.*).xml$, roles: IS_AUTHENTICATED_ANONYMOUSLY }
63 - { path: ^/share, roles: IS_AUTHENTICATED_ANONYMOUSLY } 65 - { path: ^/share, roles: IS_AUTHENTICATED_ANONYMOUSLY }
64 - { path: ^/settings, roles: ROLE_SUPER_ADMIN } 66 - { path: ^/settings, roles: ROLE_SUPER_ADMIN }
65 - { path: ^/annotations, roles: ROLE_USER } 67 - { path: ^/annotations, roles: ROLE_USER }
diff --git a/app/config/services.yml b/app/config/services.yml
index 9a1ce80b..7b85d846 100644
--- a/app/config/services.yml
+++ b/app/config/services.yml
@@ -42,3 +42,11 @@ services:
42 arguments: ["@session"] 42 arguments: ["@session"]
43 tags: 43 tags:
44 - { name: kernel.event_listener, event: security.interactive_login, method: onInteractiveLogin } 44 - { name: kernel.event_listener, event: security.interactive_login, method: onInteractiveLogin }
45
46 craue_config_cache_provider:
47 class: Symfony\Component\Cache\Adapter\FilesystemAdapter
48 public: false
49 arguments:
50 - 'craue_config'
51 - 0
52 - '%kernel.cache_dir%'
diff --git a/app/config/tests/parameters_test.mysql.yml b/app/config/tests/parameters_test.mysql.yml
index bca2d466..36b227fb 100644
--- a/app/config/tests/parameters_test.mysql.yml
+++ b/app/config/tests/parameters_test.mysql.yml
@@ -6,4 +6,5 @@ parameters:
6 test_database_user: root 6 test_database_user: root
7 test_database_password: ~ 7 test_database_password: ~
8 test_database_path: ~ 8 test_database_path: ~
9 env(TEST_DATABASE_PATH): ~
9 test_database_charset: utf8mb4 10 test_database_charset: utf8mb4
diff --git a/app/config/tests/parameters_test.pgsql.yml b/app/config/tests/parameters_test.pgsql.yml
index 3e18d4a0..60f51df6 100644
--- a/app/config/tests/parameters_test.pgsql.yml
+++ b/app/config/tests/parameters_test.pgsql.yml
@@ -6,4 +6,5 @@ parameters:
6 test_database_user: travis 6 test_database_user: travis
7 test_database_password: ~ 7 test_database_password: ~
8 test_database_path: ~ 8 test_database_path: ~
9 env(TEST_DATABASE_PATH): ~
9 test_database_charset: utf8 10 test_database_charset: utf8
diff --git a/app/config/tests/parameters_test.sqlite.yml b/app/config/tests/parameters_test.sqlite.yml
index b8a5f41a..5c731bf5 100644
--- a/app/config/tests/parameters_test.sqlite.yml
+++ b/app/config/tests/parameters_test.sqlite.yml
@@ -5,5 +5,8 @@ parameters:
5 test_database_name: ~ 5 test_database_name: ~
6 test_database_user: ~ 6 test_database_user: ~
7 test_database_password: ~ 7 test_database_password: ~
8 test_database_path: "%kernel.root_dir%/../data/db/wallabag_test.sqlite" 8 # Using an environnement variable in order to avoid the error "attempt to write a readonly database"
9 # when the schema is dropped then recreate
10 test_database_path: "%env(TEST_DATABASE_PATH)%"
11 env(TEST_DATABASE_PATH): "%kernel.root_dir%/../data/db/wallabag_test.sqlite"
9 test_database_charset: utf8 12 test_database_charset: utf8
diff --git a/app/config/wallabag.yml b/app/config/wallabag.yml
new file mode 100644
index 00000000..b45934e4
--- /dev/null
+++ b/app/config/wallabag.yml
@@ -0,0 +1,161 @@
1wallabag_core:
2 version: 2.2.3
3 paypal_url: "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UBA65LG3FX9Y&lc=gb"
4 languages:
5 en: 'English'
6 fr: 'Français'
7 de: 'Deutsch'
8 tr: 'Türkçe'
9 fa: 'فارسی'
10 ro: 'Română'
11 pl: 'Polish'
12 da: 'Dansk'
13 es: 'Español'
14 oc: 'Occitan'
15 it: 'Italiano'
16 pt: 'Português'
17 items_on_page: 12
18 theme: material
19 language: '%locale%'
20 rss_limit: 50
21 reading_speed: 1
22 cache_lifetime: 10
23 action_mark_as_read: 1
24 list_mode: 0
25 fetching_error_message_title: 'No title found'
26 fetching_error_message: |
27 wallabag can't retrieve contents for this article. Please <a href="http://doc.wallabag.org/en/user/errors_during_fetching.html#how-can-i-help-to-fix-that">troubleshoot this issue</a>.
28 api_limit_mass_actions: 10
29 encryption_key_path: "%kernel.root_dir%/../data/site-credentials-secret-key.txt"
30 default_internal_settings:
31 -
32 name: share_public
33 value: 1
34 section: entry
35 -
36 name: carrot
37 value: 1
38 section: entry
39 -
40 name: share_diaspora
41 value: 1
42 section: entry
43 -
44 name: diaspora_url
45 value: http://diasporapod.com
46 section: entry
47 -
48 name: share_unmark
49 value: 1
50 section: entry
51 -
52 name: unmark_url
53 value: https://unmark.it
54 section: entry
55 -
56 name: share_shaarli
57 value: 1
58 section: entry
59 -
60 name: share_scuttle
61 value: 1
62 section: entry
63 -
64 name: shaarli_url
65 value: http://myshaarli.com
66 section: entry
67 -
68 name: scuttle_url
69 value: http://scuttle.org
70 section: entry
71 -
72 name: share_mail
73 value: 1
74 section: entry
75 -
76 name: share_twitter
77 value: 1
78 section: entry
79 -
80 name: show_printlink
81 value: 1
82 section: entry
83 -
84 name: restricted_access
85 value: 0
86 section: entry
87 -
88 name: export_epub
89 value: 1
90 section: export
91 -
92 name: export_mobi
93 value: 1
94 section: export
95 -
96 name: export_pdf
97 value: 1
98 section: export
99 -
100 name: export_csv
101 value: 1
102 section: export
103 -
104 name: export_json
105 value: 1
106 section: export
107 -
108 name: export_txt
109 value: 1
110 section: export
111 -
112 name: export_xml
113 value: 1
114 section: export
115 -
116 name: import_with_redis
117 value: 0
118 section: import
119 -
120 name: import_with_rabbitmq
121 value: 0
122 section: import
123 -
124 name: piwik_enabled
125 value: 0
126 section: analytics
127 -
128 name: piwik_host
129 value: v2.wallabag.org
130 section: analytics
131 -
132 name: piwik_site_id
133 value: 1
134 section: analytics
135 -
136 name: demo_mode_enabled
137 value: 0
138 section: misc
139 -
140 name: demo_mode_username
141 value: wallabag
142 section: misc
143 -
144 name: download_images_enabled
145 value: 0
146 section: misc
147 -
148 name: wallabag_support_url
149 value: https://www.wallabag.org/pages/support.html
150 section: misc
151 -
152 name: api_user_registration
153 value: 0
154 section: api
155
156wallabag_user:
157 registration_enabled: "%fosuser_registration%"
158
159wallabag_import:
160 allow_mimetypes: ['application/octet-stream', 'application/json', 'text/plain', 'text/csv']
161 resource_dir: "%kernel.root_dir%/../web/uploads/import"
diff --git a/app/config/webpack/common.js b/app/config/webpack/common.js
new file mode 100644
index 00000000..c497689a
--- /dev/null
+++ b/app/config/webpack/common.js
@@ -0,0 +1,40 @@
1const path = require('path');
2const webpack = require('webpack');
3const StyleLintPlugin = require('stylelint-webpack-plugin');
4
5const rootDir = path.resolve(__dirname, '../../../');
6
7module.exports = function () {
8 return {
9 entry: {
10 material: path.join(rootDir, './app/Resources/static/themes/material/index.js'),
11 baggy: path.join(rootDir, './app/Resources/static/themes/baggy/index.js'),
12 public: path.join(rootDir, './app/Resources/static/themes/_global/share.js'),
13 },
14 output: {
15 filename: '[name].js',
16 path: path.resolve(rootDir, 'web/bundles/wallabagcore'),
17 publicPath: '/bundles/wallabagcore/',
18 },
19 plugins: [
20 new webpack.ProvidePlugin({
21 $: 'jquery',
22 jQuery: 'jquery',
23 'window.$': 'jquery',
24 'window.jQuery': 'jquery',
25 }),
26 new StyleLintPlugin({
27 configFile: '.stylelintrc',
28 failOnError: false,
29 quiet: false,
30 context: 'app/Resources/static/themes',
31 files: '**/*.scss',
32 }),
33 ],
34 resolve: {
35 alias: {
36 jquery: path.join(rootDir, 'node_modules/jquery/dist/jquery.js'),
37 },
38 },
39 };
40};
diff --git a/app/config/webpack/dev.js b/app/config/webpack/dev.js
new file mode 100644
index 00000000..b6551152
--- /dev/null
+++ b/app/config/webpack/dev.js
@@ -0,0 +1,61 @@
1const webpackMerge = require('webpack-merge');
2const webpack = require('webpack');
3const commonConfig = require('./common.js');
4
5module.exports = function () {
6 return webpackMerge(commonConfig(), {
7 devtool: 'eval-source-map',
8 output: {
9 filename: '[name].dev.js',
10 },
11
12 devServer: {
13 hot: true,
14 // enable HMR on the server
15
16 contentBase: './web',
17 // match the output path
18 },
19 plugins: [
20 new webpack.HotModuleReplacementPlugin(),
21 ],
22 module: {
23 rules: [
24 {
25 enforce: 'pre',
26 test: /\.js$/,
27 loader: 'eslint-loader',
28 exclude: /node_modules/,
29 },
30 {
31 test: /\.js$/,
32 exclude: /(node_modules)/,
33 use: {
34 loader: 'babel-loader',
35 options: {
36 presets: ['env'],
37 },
38 },
39 },
40 {
41 test: /\.(s)?css$/,
42 use: [
43 'style-loader',
44 {
45 loader: 'css-loader',
46 options: {
47 importLoaders: 1,
48 },
49 },
50 'postcss-loader',
51 'sass-loader',
52 ],
53 },
54 {
55 test: /\.(jpg|png|gif|svg|eot|ttf|woff|woff2)$/,
56 use: 'url-loader',
57 },
58 ],
59 },
60 });
61};
diff --git a/app/config/webpack/prod.js b/app/config/webpack/prod.js
new file mode 100644
index 00000000..44961cc5
--- /dev/null
+++ b/app/config/webpack/prod.js
@@ -0,0 +1,99 @@
1const webpack = require('webpack');
2const webpackMerge = require('webpack-merge');
3const ExtractTextPlugin = require('extract-text-webpack-plugin');
4const ManifestPlugin = require('webpack-manifest-plugin');
5
6const commonConfig = require('./common.js');
7
8module.exports = function () {
9 return webpackMerge(commonConfig(), {
10 output: {
11 filename: '[name].js',
12 },
13 devtool: 'source-map',
14 plugins: [
15 new webpack.DefinePlugin({
16 'process.env': {
17 'NODE_ENV': JSON.stringify('production'),
18 },
19 }),
20 new webpack.optimize.UglifyJsPlugin({
21 beautify: false,
22 mangle: {
23 screw_ie8: true,
24 keep_fnames: true,
25 },
26 compress: {
27 screw_ie8: true,
28 warnings: false,
29 },
30 comments: false,
31 }),
32 new ExtractTextPlugin('[name].css'),
33 new ManifestPlugin({
34 fileName: 'manifest.json',
35 }),
36 ],
37 module: {
38 rules: [
39 {
40 enforce: 'pre',
41 test: /\.js$/,
42 loader: 'eslint-loader',
43 exclude: /node_modules/,
44 },
45 {
46 test: /\.js$/,
47 exclude: /(node_modules)/,
48 use: {
49 loader: 'babel-loader',
50 options: {
51 presets: ['env'],
52 },
53 },
54 },
55 {
56 test: /\.(s)?css$/,
57 use: ExtractTextPlugin.extract({
58 fallback: 'style-loader',
59 use: [
60 {
61 loader: 'css-loader',
62 options: {
63 importLoaders: 1,
64 minimize: {
65 discardComments: {
66 removeAll: true,
67 },
68 core: true,
69 minifyFontValues: true,
70 },
71 },
72 },
73 'postcss-loader',
74 'sass-loader',
75 ],
76 }),
77 },
78 {
79 test: /\.(jpg|png|gif|svg)$/,
80 use: {
81 loader: 'file-loader',
82 options: {
83 name: 'img/[name].[ext]',
84 },
85 },
86 },
87 {
88 test: /\.(eot|ttf|woff|woff2)$/,
89 use: {
90 loader: 'file-loader',
91 options: {
92 name: 'fonts/[name].[ext]',
93 },
94 },
95 },
96 ],
97 },
98 });
99};