1
0
mirror of https://github.com/wallabag/docker synced 2025-12-13 09:46:27 +00:00

172 Commits

Author SHA1 Message Date
Kevin Decherf
3ee10895d8 wip
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2021-03-30 22:14:34 +02:00
Jeremy Benoist
13818bd90e 2.4.2 2021-03-16 12:17:19 +01:00
Jeremy Benoist
1b5fe1a934 Add missing parameter server_name for 2.4.1 2021-01-05 15:09:39 +01:00
Jérémy Benoist
9d44149e4d 2.4.1 2021-01-05 15:00:15 +01:00
Jérémy Benoist
2b99017b25 Merge pull request #239 from wallabag/otp-issuer 2021-01-04 06:47:50 +01:00
Jérémy Benoist
a85e592e6e Merge pull request #240 from wallabag/update-readme 2021-01-04 06:47:18 +01:00
Kevin Decherf
f4a8e5eadc Update README to include SYMFONY__ENV__DOMAIN_NAME in the quickstart
The default value of this variable leads to a lot of issues with assets
when new comers try wallabag. This change should reduce the occurrence of
this kind of issue.

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2020-12-31 18:53:26 +01:00
Kevin Decherf
f460f40b8c Add new parameter server_name for 2FA issuer
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2020-12-31 18:44:50 +01:00
Jérémy Benoist
58c3977a3c Merge pull request #238 from hoh/patch-1 2020-12-29 06:15:45 +01:00
Hugo Herter
aede9b9c98 Fix upgrading to 2.4 requires make and bash
Running `make update` requires make and bash to be installed.

Closes #237
2020-12-29 00:20:52 +01:00
Jérémy Benoist
749587fb4f Merge pull request #228 from wallabag/fix/env-prod-cli-parameter
Fix `-e=prod` parameter
2020-12-10 20:11:20 +01:00
Jeremy Benoist
6839862b04 Fix -e=prod parameter 2020-12-10 17:31:31 +01:00
Jérémy Benoist
f4f8bac984 Merge pull request #225 from wallabag/release-2.4.0
2.4.0
2020-12-10 16:11:05 +01:00
Jeremy Benoist
a04e494755 Update to 2.4.0 2020-12-10 16:04:00 +01:00
Jérémy Benoist
bd6e2b174e 2.4.0 2020-12-10 15:05:43 +01:00
Jérémy Benoist
e7ebbc69da Merge pull request #221 from egoexpress/egoexpress-alpine-312
Update Alpine base image to 3.12
2020-11-30 03:45:17 +01:00
Björn Stierand
c5df063ccb update Alpine base image to 3.12, change packages 2020-11-28 20:35:26 +01:00
Jérémy Benoist
d619c63e43 Merge pull request #223 from wallabag/github-actions
Ditch Travis to use GitHub Actions
2020-11-27 17:22:01 +01:00
Jeremy Benoist
7e43f2acfa Update badge in README 2020-11-27 14:52:31 +01:00
Jeremy Benoist
f02adb2504 Ditch Travis to use GitHub Actions
Jump to GitHub Actions mostly because I found them most reliable these days (weeks?) than Travis.
And also because the open source builds are very limited now.
2020-11-27 14:50:07 +01:00
Jérémy Benoist
0e7fa2bca7 Merge pull request #216 from wallabag/dependabot/add-v2-config-file
Create Dependabot config file
2020-10-16 13:21:03 +02:00
dependabot-preview[bot]
1f1dd12cc3 Create Dependabot config file 2020-10-16 10:45:04 +00:00
Jérémy Benoist
b291bf697e Merge pull request #189 from pando85/master
Remove ipv6 to avoid fail when ipv6 is not defined
2020-05-13 08:21:00 +02:00
Jérémy Benoist
511a2595bc Merge pull request #195 from ywoly/master
Set "expose_php" to "Off" in php.ini
2020-04-15 13:38:26 +02:00
ywoly
6962f33ed7 Set "expose_php" to "Off" in php.ini 2020-04-15 12:15:32 +02:00
Jérémy Benoist
836f9871ef Merge pull request #194 from wallabag/feature/two-factor
Add env variables for two-factor auth
2020-04-15 12:01:10 +02:00
ywoly
d02c1a404a Add env variables for two-factor auth 2020-04-15 09:24:48 +02:00
Pando85
b8ab40b6b4 Remove ipv6 to avoid fail when ipv6 is not defined 2020-04-13 20:00:11 +02:00
Jérémy Benoist
2cd061f08d Merge pull request #183 from ivzhh/master
Prepare for wallabag 2.4
2020-03-27 15:54:48 +01:00
ivz hh
1693adc27c Prepare for wallabag 2.4
Problem: I try to build image for wallabag 2.4-dev as of Feb 29, 2020.
The building fails due to two missing packages:

* py-mysqldb
* py-psycopg2

It seems these two packages are included in alpine:3.10, not yet in
alpine:latest. After launching wallabag 2.4-dev, a zhihu page reports
error and wallabag suggests to install php7-intl.

Solution:

* Fix alpine version to 3.10. The reason is also to avoid
CVE-2019-5021 (alpine set root password to NULL). 3.10 is not affected.
In case some users use tag 3.9 and happen to have 3.9.2, then they may
be affected.
* Add php7-intl to meet new requirement
2020-02-29 08:40:31 -07:00
Jérémy Benoist
a444f0db9d Merge pull request #173 from hoh/patch-1
Fix Nginx was not binding on IPv6
2019-12-05 18:15:01 -08:00
Hugo Herter
b98d38cbed Fix Nginx was not binding on IPv6
Problem: Nginx is only binding to the IPv4. Deployments with IPv6 require forking the image or overwriting `nginx.conf`.

Solution: Edit `nginx.conf` to listen to both IPv4 and IPv6 by making it listen on `[::]:80`.

Note: This may be related and contradictory to #54
2019-12-05 23:46:46 +01:00
Jérémy Benoist
6c548be161 Update README.md
See https://github.com/wallabag/docker/issues/152#issuecomment-561118356
2019-12-03 16:44:19 -08:00
Nicolas Lœuillet
174fa565eb Merge pull request #169 from cstuder/patch-1
Readme: Fixes link to documentation
2019-10-31 14:30:31 +01:00
Christian Studer
45989b38de Readme: Fixes link to documentation 2019-10-30 17:25:17 +01:00
Jérémy Benoist
af075af5d8 Merge pull request #160 from sviande/config_sentry
Sentry: fix template parameters
2019-06-19 10:20:49 +02:00
Sébastien Viande
51a60408e1 Sentry: fix template parameters 2019-06-19 10:06:02 +02:00
Jérémy Benoist
bea6b2fcc6 Merge pull request #159 from sviande/config_sentry
Config: add sentry_dsn entry
2019-06-18 20:28:39 +02:00
Sébastien Viande
e189338065 Config: add sentry_dsn entry 2019-06-18 20:11:08 +02:00
Jérémy Benoist
8595085d6b Merge pull request #158 from brouberol/patch-1
Fix iconv setup to make it support non-ASCII encodings
2019-06-14 20:32:36 +02:00
Balthazar Rouberol
503114fcba Fix iconv/musl
This PR adds 2 instructions to the Docker image build, making sure that `iconv` is setup properly.

This fixes https://github.com/wallabag/wallabag/issues/4011

For more context about the actual underlying issue that this fixes, you can read up
* https://github.com/docker-library/php/issues/240
* https://github.com/docker-library/php/issues/428

Kind regards
2019-06-14 13:44:59 +02:00
Jérémy Benoist
88bf8bb86d Merge pull request #106 from glego/add-secure-email
Add secure email
2019-06-05 11:39:08 +02:00
Jérémy Benoist
58a4d10cc5 Merge pull request #156 from WagnerChristoph/patch-1
fix typo in README.md
2019-05-27 09:28:32 +02:00
Christoph Wagner
501c4a08c6 fix typo in README.md 2019-05-24 22:16:19 +02:00
Jérémy Benoist
710cc43af4 Merge pull request #155 from wallabag/release-2.3.8
2.3.8
2019-05-14 13:24:19 +02:00
Jeremy Benoist
b2afa8eff4 2.3.8 2019-05-14 12:15:56 +02:00
Jérémy Benoist
a01e124295 Merge pull request #150 from wallabag/release-2.3.7
2.3.7
2019-03-04 15:21:33 +01:00
Jeremy Benoist
4abeb0db73 2.3.7 2019-03-04 13:44:40 +01:00
Jérémy Benoist
ca1dd1d464 Merge pull request #147 from jeroenj/tzdata
Adds tzdata to installed packages
2019-02-27 16:17:27 +01:00
Jérémy Benoist
c58b7b4af2 Merge pull request #148 from Chostakovitch/master
Add locale environment variable to README
2019-02-27 16:17:10 +01:00
Quentin Duchemin
4dcaf994ab Add locale environment variable to README 2019-02-27 11:15:10 +01:00
Jeroen Jacobs
8737b7115e Adds tzdata to installed packages
This allows for setting the timezone using the TZ environment variable.
2019-02-26 21:46:49 +01:00
Jérémy Benoist
dd280bd5cf Merge pull request #142 from wallabag/release-2.3.6
2.3.6
2019-01-11 22:39:19 +01:00
Jérémy Benoist
e292a1c0c2 2.3.6 2019-01-11 22:09:49 +01:00
Jérémy Benoist
7cce137040 Merge pull request #137 from bencer/master
Add php7-tidy
2019-01-04 07:14:21 +01:00
Jorge Salamero Sanz
ad326dcfe3 Add php7-tidy 2018-12-15 16:31:59 +01:00
Jérémy Benoist
71dd17939c Merge pull request #97 from mostlyjason/patch-1
Adding example of how to set the domain name
2018-12-15 08:32:22 +01:00
Jérémy Benoist
66c3967ef5 Merge pull request #134 from kmlucy/master
Add redis environmental variables
2018-12-15 08:30:49 +01:00
Jérémy Benoist
6d7fdd92c8 Merge pull request #136 from wallabag/release-2.3.5
2.3.5
2018-12-15 08:27:38 +01:00
Jérémy Benoist
f9f5b5c68c 2.3.5 2018-12-15 07:18:19 +01:00
Kyle Lucy
386924f2cc Update README.md 2018-12-07 22:44:48 -05:00
Kyle Lucy
3d3f11fb85 add redis environmental variables 2018-12-07 22:42:18 -05:00
Jérémy Benoist
25bf47149f Merge pull request #132 from wallabag/release-2.3.4
2.3.4
2018-11-24 22:48:53 +01:00
Jeremy Benoist
0cee0470de Add missing PHP extension 2018-11-24 22:38:53 +01:00
Jeremy Benoist
b626873351 2.3.4 2018-11-24 21:57:13 +01:00
Jérémy Benoist
e741136827 Merge pull request #127 from Strubbl/patch-1
Update docker-compose.mariadb.yml
2018-10-15 20:27:05 +00:00
Jérémy Benoist
b92f4c2740 Merge pull request #119 from philwrenn/master
Added SYMFONY__ENV__DATABASE_CHARSET envorinment variable to README.
2018-10-15 19:34:19 +00:00
Strubbl
040655c3c4 Update docker-compose.mariadb.yml
fix issue pointed out by @TofPlay in https://github.com/wallabag/wallabag/issues/3742#issuecomment-429947139
2018-10-15 19:58:09 +02:00
Jérémy Benoist
5f78ae9a21 Merge pull request #126 from burkemw3/patch-1
Use alpine:latest instead of alpine:edge for base
2018-10-13 06:00:04 +00:00
Matt Burke
e510f9db1b Use alpine:latest instead of alpine:edge for base
While investigating of wallabag/wallabag#3723:
- I could not build wallabag docker image with edge
- I succeeded in building with latest
- building with latest resolved wallabag/wallabag#3723

Additionally, alpine recommends against using edge for end users ([0][]).

[0]: https://wiki.alpinelinux.org/wiki/Edge
2018-10-10 20:08:41 -04:00
Jérémy Benoist
926e8c7445 Merge pull request #116 from Alwaysin/patch-1
Update to 2.3.3
2018-09-17 05:50:26 +00:00
Philip Wrenn
7d7b1a846f added SYMFONY__ENV__DATABASE_CHARSET envorinment variable to README. 2018-08-12 08:45:44 -04:00
Alwaysin
8fd1421d36 Update to 2.3.3 2018-07-15 21:02:12 +02:00
Jérémy Benoist
f86d945624 Merge pull request #107 from greenrd/feature/db-driver-class
Support Postgres 10
2018-03-17 13:26:42 +01:00
Robin Green
a37317f55f Support Postgres 10
* Add SYMFONY__ENV__DATABASE_DRIVER_CLASS environment variable which can
  be set to the necessary driver class for Postgres 10
* Use this in travis.yml
2018-03-11 09:22:26 +00:00
Glenn Goffin
47dc65b84e add mailer transport env variable 2018-02-24 15:59:18 +01:00
Glenn Goffin
64fc68eb56 add secure email 2018-02-24 15:56:41 +01:00
Glenn Goffin
213d23691c add secure email 2018-02-23 20:39:10 +01:00
Nicolas Lœuillet
eeead4ff44 Merge pull request #103 from TomFaulkner/master
101 - Typo on readme
2018-02-16 08:55:05 +01:00
Tom Faulkner
16a1a1236a Merge pull request #1 from TomFaulkner/TomFaulkner-patch-1-typo-in-readme
Update README.md
2018-02-09 20:24:04 -06:00
Tom Faulkner
2460f55662 Update README.md
Remove dash leading to an error.
2018-02-09 20:23:10 -06:00
Nicolas Lœuillet
0fe76aa896 Merge pull request #102 from wallabag/wllbg-232
wallabag 2.3.2
2018-01-22 14:04:07 +01:00
Nicolas Lœuillet
0f52136d3d wallabag 2.3.2 2018-01-22 13:39:11 +01:00
Jason Skowronski
de684f5a44 Adding example of how to set the domain name 2018-01-08 15:44:33 -08:00
Nicolas Lœuillet
bf0316bac6 Merge pull request #95 from wallabag/nicosomb-patch-1
wallabag 2.3.1
2017-12-26 22:23:26 +01:00
Nicolas Lœuillet
ae7aefe8e4 Updated parameters for 2.3.1 2017-12-26 21:35:43 +01:00
Nicolas Lœuillet
ef910d313c wallabag 2.3.1 2017-12-26 21:12:13 +01:00
Nicolas Lœuillet
51e3b625c0 Merge pull request #87 from bananenmannfrau/master
makes email confirmation for user registration configurable
2017-12-15 14:49:21 +01:00
Nicolas Lœuillet
dcaa684897 Updated README 2017-12-15 14:32:20 +01:00
bananenmannfrau
6edcd745c4 makes email confirmation for user registration configurable 2017-12-15 14:31:11 +01:00
Nicolas Lœuillet
7a476cdab0 Merge pull request #84 from Dehalion/master
allow to override database_charset and locale with env variables
2017-12-13 23:02:33 +01:00
Nicolas Lœuillet
6a7bbbb8d0 Merge pull request #89 from wallabag/wallabag-23
Updated image to wallabag 2.3.0
2017-12-13 22:43:17 +01:00
Nicolas Lœuillet
e5456115c1 Forced postgres 9.6 2017-12-13 22:32:43 +01:00
Nicolas Lœuillet
7b68684720 Updated image to wallabag 2.3.0 2017-12-12 22:28:19 +01:00
David Prem
b67e80a9f8 allow to override database_charset and locale with env variables 2017-09-20 18:06:33 +02:00
Nicolas Lœuillet
434b17cd8f Merge pull request #74 from Strubbl/use-ssl-for-composer-install
use https for getting composer
2017-08-25 08:55:41 +02:00
Sven Fischer
5123e9de38 use https for getting composer 2017-07-20 21:32:25 +02:00
Marvin Steadfast
5682aefa74 changed docs for persistent storage of images. #71 2017-05-30 11:19:36 +02:00
Thomas Citharel
bf82658342 Merge pull request #69 from wallabag/update-223
Update Dockerfile to 2.2.3
2017-05-18 11:46:16 +02:00
Nicolas Lœuillet
abb0647cbd Update Dockerfile to 2.2.3 2017-05-18 11:05:41 +02:00
Marvin Steadfast
6f22d1ef68 switched to alpine edge
there are alot of php fixes in edge. alot of people have problems with
php and older kernel versions to collect random data.

also included a alpine upgrade command. this will prevent docker from
building a wallabag image with older system files.
2017-05-09 08:59:37 +02:00
Marvin Steadfast
d1c050662b added edge main repo to fix rabbitmq-c dep for php7-amqp 2017-03-22 11:24:05 +01:00
Marvin Steadfast
038a5ea6c7 apk add uses now the no-cache option 2017-03-22 11:13:30 +01:00
Marvin Steadfast
c42058bf0f MariaDB default encoding utf8mb4 and maintenance
* MariaDB encoding is set when creating DB through the entrypoint
* Cleaning Dockerfile
  * Removed `POSTGRES_USER`
  * Combined run commands
  * Changed deprecated `MAINTAINER` to `LABEL`
2017-03-22 10:56:57 +01:00
Nicolas Lœuillet
3e4cd35253 Merge pull request #56 from wallabag/wllbg-222
Update Dockerfile with latest release
2017-03-08 10:00:11 +01:00
Nicolas Lœuillet
8c15693e12 Update Dockerfile with latest release 2017-03-02 15:49:19 +01:00
Marvin Steadfast
f6e4816eb5 provisioner function in entrypoint 2017-02-06 10:20:38 +01:00
Marvin Steadfast
bff2dd3d8b using alpine 3.5 instead of edge 2017-02-06 10:20:38 +01:00
xsteadfastx
90265c1653 Merge pull request #48 from xsteadfastx/version-2.2.1
Version bumb to 2.2.1 and added migrate command
2017-02-01 11:07:51 +01:00
Marvin Steadfast
fb020c3be6 Version bumb to 2.2.1 and added migrate command
made the changes to get 2.2.1 running plus added a migrate command to
the entrypoint. documented it in the readme.
2017-01-31 16:33:19 +01:00
Jeremy Benoist
80a3379a76 Merge pull request #45 from janLo/import-worker
Add option to run redis based import workers
2017-01-23 09:53:02 +01:00
Jeremy Benoist
5203ab63b1 Rename importer to import 2017-01-23 09:45:42 +01:00
Jan Losinski
65b2e2c7a9 Add documentation for the redis worker service
Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
2017-01-23 09:28:27 +01:00
Jan Losinski
4de27027b9 Add ability to run wannabag redis importer worker
This adds the ability to run wallabag async import worker that
interacts with a redis service.

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
2017-01-23 09:28:27 +01:00
Jeremy Benoist
924d663c86 Merge pull request #46 from wallabag/dockerfile-216
Update Dockerfile for wallabag 2.1.6
2017-01-18 19:26:07 +01:00
Nicolas Lœuillet
ec8f599298 Update Dockerfile for wallabag 2.1.6 2017-01-18 10:44:17 +01:00
xsteadfastx
125aad2c1c Merge pull request #43 from lotooo/master
Add a POPULAtE_DATABASE env to use an existing wallabag DB
2017-01-18 09:40:29 +01:00
Jeremy Benoist
606b7d681c Merge pull request #44 from janLo/php7-zlib
Install php7-zlib
2017-01-18 09:35:50 +01:00
Jan Losinski
fdaaf37381 Install php7-zlib
Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
2017-01-17 15:40:58 +01:00
Matthieu Serrepuy
2b13ed0703 Add a POPULAtE_DATABASE env to use an existing wallabag DB 2017-01-16 22:44:43 +01:00
Marvin Steadfast
e41a237604 enabled zlib.output_compression in php.ini
thanks to @itnAAnti. #40
2017-01-04 13:41:31 +01:00
xsteadfastx
724d6492bc Merge pull request #42 from jsshandle/master
Make entrypoint.sh executable in repository and remove related statement from Dockerfile.
2016-12-29 11:45:41 +01:00
jsshandle
267618a519 Make entrypoint.sh executable in repository and remove related statement from Dockerfile. 2016-12-26 18:59:30 +01:00
xsteadfastx
0fe227a0cc Merge pull request #36 from jsshandle/master
Add .s6-svscan/finish.
2016-11-28 12:27:22 +01:00
jsshandle
d42d34cdac Add .s6-svscan/finish. 2016-11-26 20:35:51 +01:00
Nicolas Lœuillet
58cc845c75 Dockerfile for 2.1.5 2016-11-21 10:54:30 +01:00
xsteadfastx
c553787564 Merge pull request #31 from wallabag/docker-214
Dockerfile for 2.1.4
2016-11-20 08:37:45 +01:00
Nicolas Lœuillet
73187d7ce1 Dockerfile for 2.1.4 2016-11-18 11:33:36 +01:00
Marvin Steadfast
f7bd58c73a fixed location of php configuration to /etc/php7 2016-11-07 13:20:39 +01:00
Marvin Steadfast
ba8f6ec5d3 limit upload size to 100M 2016-11-07 13:20:39 +01:00
xsteadfastx
68db53e09c Merge pull request #28 from wallabag/release-213
Update Dockerfile for wallabag 2.1.3
2016-11-05 15:13:27 +01:00
Nicolas Lœuillet
530e59329a Update Dockerfile for wallabag 2.1.3 2016-11-04 15:40:24 +01:00
Marvin Steadfast
2ae7dee8af fixed typo in README 2016-11-02 11:57:04 +01:00
Marvin Steadfast
c2052c2681 env variable to disable user registration 2016-11-02 11:52:22 +01:00
xsteadfastx
310d55bdea Merge pull request #27 from xsteadfastx/master
set email settings through ansible template
2016-10-31 09:29:08 +01:00
Marvin Steadfast
76f5ecb61e set email settings through ansible template 2016-10-28 13:06:52 +02:00
Marvin Steadfast
92f5db7ba9 added test for default configuration 2016-10-24 09:53:42 +02:00
Marvin Steadfast
ee4a7e4a46 defaults for environment variable lookup for parameters.yml template
fixes #26
2016-10-21 14:48:32 +02:00
xsteadfastx
e0bc4e895d Merge pull request #25 from xsteadfastx/master
version 2.1.2 and some cleanups
2016-10-19 11:30:00 +02:00
Marvin Steadfast
ed6b4437b8 version 2.1.2 and some cleanups 2016-10-19 11:17:24 +02:00
Marvin Steadfast
af2fb30389 fixed docs to get redis working
thanks to @bobberb for pointing in the right direction.
2016-10-13 11:18:24 +02:00
xsteadfastx
af6c68a312 Merge pull request #21 from xsteadfastx/master
2.1.1 image
2016-10-12 15:26:12 +02:00
Marvin Steadfast
1f4d9af316 added db migration part to the docs 2016-10-11 16:18:52 +02:00
Marvin Steadfast
6a5ab7c126 added new dependencies and added redis support
somehow there is a problem with the parameters.yml and environment
variables. ansible templates are now used.

database migration is still a big problem.
2016-10-11 16:18:52 +02:00
Nicolas Lœuillet
f66d2aeab0 Merge pull request #20 from tomsquest/patch-1
Fix typo `the a volume` -> `a volume`
2016-10-11 12:16:32 +02:00
Thomas Queste
0d2bf2999a Fix typo the a volume -> a volume 2016-10-11 12:08:50 +02:00
Jeremy Benoist
8bd298316a Merge pull request #18 from m0/m0-fixRunCommandInExample
fixes example run-commands in README
2016-09-17 07:53:59 +02:00
Moritz Maisel
d9f9efcf13 fixes example run-commands in README 2016-09-17 01:04:01 +02:00
Nicolas Lœuillet
cccc5fb91e Merge pull request #17 from wallabag/wllbg-208
wallabag 2.0.8
2016-09-07 15:36:33 +02:00
Nicolas Lœuillet
79ae48bfac wallabag 2.0.8 2016-09-07 14:38:00 +02:00
xsteadfastx
d0691598b6 Merge pull request #16 from xsteadfastx/master
Login testing works now
2016-09-02 10:24:10 +02:00
Marvin Steadfast
28b4b03b21 readme: added badges 2016-09-01 12:04:11 +02:00
Marvin Steadfast
c65be008ec tests: some pep8 and real failing if csrf dont match 2016-09-01 09:33:17 +02:00
xsteadfastx
63ee463365 Merge pull request #1 from Strubbl/test_login
test_login: add login with csrf token and check if it was successful
2016-09-01 09:15:18 +02:00
Sven Fischer
efbcf75701 test_login: add login with csrf token and check if it was successful 2016-08-31 23:13:32 +02:00
Marvin Steadfast
b4b1469215 try to test login
i use requests to test login. the session should be saved and this
should work. but i get a error that th session expired. to run this
start wallabag and run it with pytest: `py.test -s tests/`. it will
output the html of the response.
2016-08-31 16:38:13 +02:00
Marvin Steadfast
4a81bc45db added travis testing
travis builds and spins up containers for sqlite, mariadb and postgres
and runs a simple python test script for accessing the wallabag.
2016-08-29 13:51:14 +02:00
Jeremy Benoist
107beb115c Merge pull request #14 from mmounirou/feature/allow-db-root-user-config
allow overwrite of the root postgres username
2016-08-25 11:02:11 +02:00
Mohamed MOUNIROU
67030c1c36 remove an unnecessary white space 2016-08-25 10:23:31 +02:00
Mohamed MOUNIROU
255fe53dfc set the default value for POSTGRES_USER to postgres
This is done in order to ensure backward compatibility
2016-08-24 18:28:34 +02:00
Mohamed MOUNIROU
4094d3c9ff give the ability to change postgres root user
This can be acheived by setting the environment variable POSTGRES_USER
2016-08-24 18:25:03 +02:00
Jeremy Benoist
93651c95f5 Fix bad SQLite title
and update few others titles
2016-08-24 15:17:36 +02:00
Marvin Steadfast
97783ac312 fixed README 2016-08-24 12:33:22 +02:00
Marvin Steadfast
b165d3c14f Update Dockerfile for 2.0.7 release 2016-08-23 09:34:30 +02:00
Nicolas Lœuillet
8ce69e0d48 Merge pull request #13 from nsteinmetz/patch-1
Update Dockerfile for 2.0.6 release
2016-08-10 17:57:56 +02:00
Nicolas Steinmetz
3c96d9d6d9 Update Dockerfile for 2.0.6 release 2016-08-10 17:55:39 +02:00
xsteadfastx
fdffa0f9ec Merge pull request #11 from sheeprine/fix/body_size_limit
Increase max body size from nginx
2016-07-21 13:56:48 +02:00
Stéphane Albert
6a67881572 Increase max body size from nginx
With the default client_max_body_size (1M), import cannot be used.
Raise the limit to 50M.
2016-07-21 13:38:03 +02:00
xsteadfastx
038bef09cd Merge pull request #10 from davidmehren/master
Make email settings configurable
2016-06-13 09:27:43 +02:00
David Mehren
26b75eee75 made email server settings configurable 2016-06-11 15:43:04 +02:00
Marvin Steadfast
025c51422e new version 2.0.4 2016-06-01 09:42:10 +02:00
Marvin Steadfast
5f6a948f98 new version 2.0.4 2016-05-08 12:08:42 +02:00
27 changed files with 450 additions and 2808 deletions

14
.github/dependabot.yml vendored Normal file
View File

@@ -0,0 +1,14 @@
version: 2
updates:
- package-ecosystem: docker
directory: "/"
schedule:
interval: daily
time: "04:00"
timezone: Europe/Paris
open-pull-requests-limit: 10
ignore:
- dependency-name: alpine
versions:
- ">= 3.11.a"
- "< 3.12"

54
.github/workflows/test.yml vendored Normal file
View File

@@ -0,0 +1,54 @@
name: "CI"
on:
pull_request:
branches:
- "master"
push:
branches:
- "master"
jobs:
test:
name: "Testing with database: ${{ matrix.database }}"
runs-on: "ubuntu-latest"
strategy:
fail-fast: false
matrix:
database:
- "default"
- "sqlite"
- "mariadb"
- "postgresql"
steps:
- name: "Checkout"
uses: "actions/checkout@v2"
with:
fetch-depth: 2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.5
- name: "Build image"
run: docker-compose -f tests/docker-compose.${{ matrix.database }}.yml build
- name: "Run image"
run: docker-compose -f tests/docker-compose.${{ matrix.database }}.yml up -d
- name: "Install dependencies"
run: |
pip install pytest
pip install requests
- name: "Check running instance"
run: docker ps
- name: "Wait 60s"
run: sleep 60
- name: "Run tests"
run: py.test tests/

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
/patches/*
!/patches/.keep

View File

@@ -1,66 +1,89 @@
FROM alpine:edge
MAINTAINER Marvin Steadfast <marvin@xsteadfastx.org>
FROM php:7.4.14-fpm-alpine
ENV WALLABAG_VERSION=2.0.3 \
SYMFONY__ENV__DATABASE_DRIVER=pdo_sqlite \
SYMFONY__ENV__DATABASE_HOST=127.0.0.1 \
SYMFONY__ENV__DATABASE_PORT=~ \
SYMFONY__ENV__DATABASE_NAME=symfony \
SYMFONY__ENV__DATABASE_USER=root \
SYMFONY__ENV__DATABASE_PASSWORD=~ \
SYMFONY__ENV__SECRET=ovmpmAWXRCabNlMgzlzFXDYmCFfzGv
ARG BASE=2.4.2
RUN echo "@testing http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
&& apk add --update \
ansible \
curl \
git \
libwebp@testing \
mariadb-client \
nginx \
pcre \
php7 \
php7-ctype@testing \
php7-curl@testing \
php7-dom@testing \
php7-fpm@testing \
php7-gd@testing \
php7-gettext@testing \
php7-iconv@testing \
php7-json@testing \
php7-mbstring@testing \
php7-openssl@testing \
php7-pdo_mysql@testing \
php7-pdo_pgsql@testing \
php7-pdo_sqlite@testing \
php7-phar@testing \
php7-session@testing \
php7-xml@testing \
php7@testing\
py-mysqldb \
py-psycopg2 \
py-simplejson \
s6 \
&& rm -rf /var/cache/apk/*
WORKDIR /var/www/html
RUN ln -s /usr/bin/php7 /usr/bin/php \
&& ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log
ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so php
ENV SYMFONY_ENV=prod
RUN curl -s http://getcomposer.org/installer | php \
&& mv composer.phar /usr/local/bin/composer
RUN set -ex; \
\
apk add --no-cache --virtual .run-deps \
gnu-libiconv=1.15-r3 \
imagemagick6-libs \
tzdata \
; \
apk add --no-cache --virtual .build-deps \
$PHPIZE_DEPS \
freetype-dev \
gettext-dev \
icu-dev \
imagemagick6-dev \
libjpeg-turbo-dev \
libpng-dev \
libxml2-dev \
libzip-dev \
oniguruma-dev \
postgresql-dev \
sqlite-dev \
tidyhtml-dev \
; \
docker-php-ext-configure gd --with-freetype --with-jpeg; \
docker-php-ext-install -j "$(nproc)" \
bcmath \
gd \
gettext \
iconv \
intl \
mbstring \
opcache \
pdo \
pdo_mysql \
pdo_pgsql \
pdo_sqlite \
sockets \
tidy \
zip \
; \
pecl install redis; \
pecl install imagick; \
docker-php-ext-enable \
redis \
imagick \
; \
runDeps="$( \
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \
| tr ',' '\n' \
| sort -u \
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
)"; \
apk add --virtual .wallabag-phpext-rundeps $runDeps; \
apk del .build-deps \
; \
apk add --virtual .composer-runtime-deps git patch; \
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer; \
rm -rf /usr/src/* /tmp/pear/*
RUN git clone --branch $WALLABAG_VERSION --depth 1 https://github.com/wallabag/wallabag.git /var/www/wallabag
RUN wget -O /usr/local/bin/envsubst https://github.com/a8m/envsubst/releases/download/v1.1.0/envsubst-`uname -s`-`uname -m`; \
chmod +x /usr/local/bin/envsubst
COPY root /
RUN wget -O /tmp/wallabag.tar.gz https://github.com/wallabag/wallabag/archive/$BASE.tar.gz; \
mkdir /tmp/extract; \
tar xf /tmp/wallabag.tar.gz -C /tmp/extract; \
rmdir /var/www/html; \
mv /tmp/extract/wallabag-*/ /var/www/html; \
cd /var/www/html; \
composer install --no-dev --no-interaction -o --prefer-dist; \
chown -R www-data: /var/www/html; \
rm -rf /tmp/wallabag.tar.gz /tmp/extract /root/.composer /var/www/html/var/cache/prod;
RUN cd /var/www/wallabag \
&& SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist
COPY entrypoint.sh /entrypoint.sh
COPY config/ /opt/wallabag/config/
COPY patches/ /opt/wallabag/patches/
COPY apply-patches.sh /opt/wallabag/apply-patches.sh
RUN set -ex; \
/opt/wallabag/apply-patches.sh
RUN chown -R nobody:nobody /var/www/wallabag
RUN chmod +x /entrypoint.sh
EXPOSE 80
ENTRYPOINT ["/entrypoint.sh"]
CMD ["wallabag"]
CMD ["php-fpm"]

106
README.md
View File

@@ -1,5 +1,9 @@
# What is wallabag?
![CI](https://github.com/wallabag/docker/workflows/CI/badge.svg)
[![Docker Stars](https://img.shields.io/docker/stars/wallabag/wallabag.svg?maxAge=2592000)](https://hub.docker.com/r/wallabag/wallabag/)
[![Docker Pulls](https://img.shields.io/docker/pulls/wallabag/wallabag.svg?maxAge=2592000)](https://hub.docker.com/r/wallabag/wallabag/)
[wallabag](https://www.wallabag.org/) is a self hostable application for saving web pages. Unlike other services, wallabag is free (as in freedom) and open source.
With this application you will not miss content anymore. Click, save, read it when you want. It saves the content you select so that you can read it when you have time.
@@ -11,45 +15,94 @@ Default login is `wallabag:wallabag`.
## Environment variables
- `-e MYSQL_ROOT_PASSWORD=...` (needed for the mariadb container to initialise and for the entrypoint in the wallabag container to create a database and user if its not there)
- `-e POSTGRES_PASSWORD=...` (needed for the posgres container to initialise and for the entrypoint in the wallabag container to create a database and user if not there)
- `-e POSTGRES_PASSWORD=...` (needed for the postgres container to initialise and for the entrypoint in the wallabag container to create a database and user if not there)
- `-e POSTGRES_USER=...` (needed for the posgres container to initialise and for the entrypoint in the wallabag container to create a database and user if not there)
- `-e SYMFONY__ENV__DATABASE_DRIVER=...` (defaults to "pdo_sqlite", this sets the database driver to use)
- `-e SYMFONY__ENV__DATABASE_HOST=...` (defaults to "127.0.0.1", if use mysql this should be the name of the mariadb container)
- `-e SYMFONY__ENV__DATABASE_PORT=...` (port of the database host)
- `-e SYMFONY__ENV__DATABASE_NAME=...`(defaults to "symfony", this is the name of the database to use)
- `-e SYMFONY__ENV__DATABASE_USER=...` (defaults to "root", this is the name of the database user to use)
- `-e SYMFONY__ENV__DATABASE_PASSWORD=...` (defaults to "~", this is the password of the database user to use)
- `-e SYMFONY__ENV__DATABASE_CHARSET=...` (defaults to utf8, this is the database charset to use)
- `-e SYMFONY__ENV__SECRET=...` (defaults to "ovmpmAWXRCabNlMgzlzFXDYmCFfzGv")
- `-e SYMFONY__ENV__LOCALE=...` (default to en)
- `-e SYMFONY__ENV__MAILER_HOST=...` (defaults to "127.0.0.1", the SMTP host)
- `-e SYMFONY__ENV__MAILER_USER=...` (defaults to "~", the SMTP user)
- `-e SYMFONY__ENV__MAILER_PASSWORD=...`(defaults to "~", the SMTP password)
- `-e SYMFONY__ENV__FROM_EMAIL=...`(defaults to "`wallabag@example.com`", the address wallabag uses for outgoing emails)
- `-e SYMFONY__ENV__TWOFACTOR_AUTH=...` (defaults to "true", enable or disable two-factor authentication)
- `-e SYMFONY__ENV__TWOFACTOR_SENDER=...` (defaults to "`no-reply@wallabag.org`", the address wallabag uses for two-factor emails)
- `-e SYMFONY__ENV__FOSUSER_REGISTRATION=...`(defaults to "true", enable or disable public user registration)
- `-e SYMFONY__ENV__FOSUSER_CONFIRMATION=...`(defaults to "true", enable or disable registration confirmation)
- `-e SYMFONY__ENV__DOMAIN_NAME=...` defaults to "`https://your-wallabag-url-instance.com`", the URL of your wallabag instance)
- `-e SYMFONY__ENV__REDIS_SCHEME=...` (defaults to "tcp", protocol to use to communicate with the target server (tcp, unix, or http))
- `-e SYMFONY__ENV__REDIS_HOST=...` (defaults to "redis", IP or hostname of the target server)
- `-e SYMFONY__ENV__REDIS_PORT=...` (defaults to "6379", port of the target host)
- `-e SYMFONY__ENV__REDIS_PATH=...`(defaults to "~", path of the unix socket file)
- `-e SYMFONY__ENV__REDIS_PASSWORD=...` (defaults to "~", this is the password defined in the Redis server configuration)
- `-e SYMFONY__ENV__SENTRY_DSN=...` (defaults to "~", this is the data source name for sentry)
- `-e POPULATE_DATABASE=...`(defaults to "True". Does the DB has to be populated or is it an existing one)
- `-e SYMFONY__ENV__SERVER_NAME=...` (defaults to "Your wallabag instance". Specifies a user-friendly name for the 2FA issuer)
## sqlite
## SQLite
The easiest way to start wallabag is to use the sqlite backend. You can spin that up with
The easiest way to start wallabag is to use the SQLite backend. You can spin that up with
```
$ docker run -p 80:80 xsteadfastx/wallabag
$ docker run -p 80:80 -e "SYMFONY__ENV__DOMAIN_NAME=http://localhost" wallabag/wallabag
```
and point your browser to `http://localhost:80`. For persistent storage you should start the container with the a volume:
and point your browser to `http://localhost`. For persistent storage you should start the container with a volume:
```
$ docker run -v /opt/wallabag:/var/www/wallabag/data -p 80:80 xsteadfastx/wallabag
$ docker run -v /opt/wallabag/data:/var/www/wallabag/data -v /opt/wallabag/images:/var/www/wallabag/web/assets/images -p 80:80 -e "SYMFONY__ENV__DOMAIN_NAME=http://localhost" wallabag/wallabag
```
## mariadb / mysql
## MariaDB / MySQL
For using mariadb or mysql you have to define some environment variables with the container. Example:
For using MariaDB or MySQL you have to define some environment variables with the container. Example:
```
$ docker run docker run --name wallabag-db -e "MYSQL_ROOT_PASSWORD=my-secret-pw" -d mariadb
$ docker run --name wallabag --link wallabag-db:wallabag-db -e "MYSQL_ROOT_PASSWORD=my-secret-pw" -e "SYMFONY__ENV__DATABASE_DRIVER=pdo_mysql" -e "SYMFONY__ENV__DATABASE_HOST=wallabag-db" -e "SYMFONY__ENV__DATABASE_PORT=3306" -e "SYMFONY__ENV__DATABASE_NAME=wallabag" -e "SYMFONY__ENV__DATABASE_USER=wallabag" -e "SYMFONY__ENV__DATABASE_PASSWORD=wallapass" -p 80:80 wallabag/wallabag
$ docker run --name wallabag-db -e "MYSQL_ROOT_PASSWORD=my-secret-pw" -d mariadb
$ docker run --name wallabag --link wallabag-db:wallabag-db -e "MYSQL_ROOT_PASSWORD=my-secret-pw" -e "SYMFONY__ENV__DATABASE_DRIVER=pdo_mysql" -e "SYMFONY__ENV__DATABASE_HOST=wallabag-db" -e "SYMFONY__ENV__DATABASE_PORT=3306" -e "SYMFONY__ENV__DATABASE_NAME=wallabag" -e "SYMFONY__ENV__DATABASE_USER=wallabag" -e "SYMFONY__ENV__DATABASE_PASSWORD=wallapass" -e "SYMFONY__ENV__DATABASE_CHARSET=utf8mb4" -e "SYMFONY__ENV__DOMAIN_NAME=http://localhost" -p 80:80 wallabag/wallabag
```
## postgresql
## PostgreSQL
For using postgresql you have to define some environment variables with the container. Example:
For using PostgreSQL you have to define some environment variables with the container. Example:
```
$ docker run docker run --name wallabag-db -e "POSTGRES_PASSWORD=my-secret-pw" -d postgres
$ docker run --name wallabag --link wallabag-db:wallabag-db -e "POSTGRES_PASSWORD=my-secret-pw" -e "SYMFONY__ENV__DATABASE_DRIVER=pdo_pgsql" -e "SYMFONY__ENV__DATABASE_HOST=wallabag-db" -e "SYMFONY__ENV__DATABASE_PORT=5432" -e "SYMFONY__ENV__DATABASE_NAME=wallabag" -e "SYMFONY__ENV__DATABASE_USER=wallabag" -e "SYMFONY__ENV__DATABASE_PASSWORD=wallapass" -p 80:80 wallabag/wallabag
$ docker run --name wallabag-db -e "POSTGRES_PASSWORD=my-secret-pw" -e "POSTGRES_USER=my-super-user" -d postgres:9.6
$ docker run --name wallabag --link wallabag-db:wallabag-db -e "POSTGRES_PASSWORD=my-secret-pw" -e "POSTGRES_USER=my-super-user" -e "SYMFONY__ENV__DATABASE_DRIVER=pdo_pgsql" -e "SYMFONY__ENV__DATABASE_HOST=wallabag-db" -e "SYMFONY__ENV__DATABASE_PORT=5432" -e "SYMFONY__ENV__DATABASE_NAME=wallabag" -e "SYMFONY__ENV__DATABASE_USER=wallabag" -e "SYMFONY__ENV__DATABASE_PASSWORD=wallapass" -e "SYMFONY__ENV__DOMAIN_NAME=http://localhost" -p 80:80 wallabag/wallabag
```
## Redis
To use redis with a Docker link, a redis container with the name `redis` is needed and none of the `REDIS` environmental variables are needed:
```
$ docker run -p 6379:6379 --name redis redis:alpine
$ docker run -p 80:80 -e "SYMFONY__ENV__DOMAIN_NAME=http://localhost" --link redis:redis wallabag/wallabag
```
To use redis with an external redis host, set the appropriate environmental variables. Example:
```
$ docker run -p 80:80 -e "SYMFONY__ENV__REDIS_HOST=my.server.hostname" -e "SYMFONY__ENV__REDIS_PASSWORD=my-secret-pw" -e "SYMFONY__ENV__DOMAIN_NAME=http://localhost" wallabag/wallabag
```
## Upgrading
If there is a version upgrade that needs a database migration. The most easy way to do is running the `migrate` command:
```
$ docker run --link wallabag-db:wallabag-db -e <... your config variables here ...> wallabag/wallabag migrate
```
Or you can start the container with the new image and run the migration command manually:
```
$ docker exec -t NAME_OR_ID_OF_YOUR_WALLABAG_CONTAINER /var/www/wallabag/bin/console doctrine:migrations:migrate --env=prod --no-interaction
```
## docker-compose
@@ -57,7 +110,7 @@ $ docker run --name wallabag --link wallabag-db:wallabag-db -e "POSTGRES_PASSWOR
It's a good way to use [docker-compose](https://docs.docker.com/compose/). Example:
```
version: '2'
version: '3'
services:
wallabag:
image: wallabag/wallabag
@@ -69,16 +122,29 @@ services:
- SYMFONY__ENV__DATABASE_NAME=wallabag
- SYMFONY__ENV__DATABASE_USER=wallabag
- SYMFONY__ENV__DATABASE_PASSWORD=wallapass
- SYMFONY__ENV__DATABASE_CHARSET=utf8mb4
- SYMFONY__ENV__MAILER_HOST=127.0.0.1
- SYMFONY__ENV__MAILER_USER=~
- SYMFONY__ENV__MAILER_PASSWORD=~
- SYMFONY__ENV__FROM_EMAIL=wallabag@example.com
- SYMFONY__ENV__DOMAIN_NAME=https://your-wallabag-url-instance.com
- SYMFONY__ENV__SERVER_NAME="Your wallabag instance"
ports:
- "80"
volumes:
- /opt/wallabag/images:/var/www/wallabag/web/assets/images
db:
image: mariadb
environment:
- MYSQL_ROOT_PASSWORD=wallaroot
volumes:
- /opt/wallabag:/var/lib/mysql
- /opt/wallabag/data:/var/lib/mysql
redis:
image: redis:alpine
```
Note that you must fill out the mail related variables according to your mail config.
## nginx
I use nginx to make wallabag public available. This is a example how to use it:
@@ -101,3 +167,11 @@ server {
}
```
## Import worker
To run the [async redis import worker](https://doc.wallabag.org/en/admin/asynchronous.html#install-redis-for-asynchronous-tasks) use the following command:
```
$ docker run --name wallabag --link wallabag-db:wallabag-db --link redis:redis -e <... your config variables here ...> wallabag/wallabag import <type>
```
Where `<type>` is one of pocket, readability, instapaper, wallabag_v1, wallabag_v2, firefox or chrome.

5
apply-patches.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/sh
for i in $(find /opt/wallabag/patches/ -type f -name "*.patch" | sort); do
(cd /var/www/html ; echo "Applying ${i}" ; patch -p1 < ${i})
done

62
config/parameters.yml Normal file
View File

@@ -0,0 +1,62 @@
parameters:
database_driver: ${SYMFONY__ENV__DATABASE_DRIVER:-pdo_sqlite}
database_driver_class: ${SYMFONY__ENV__DATABASE_DRIVER_CLASS:-~}
database_host: ${SYMFONY__ENV__DATABASE_HOST:-127.0.0.1}
database_port: ${SYMFONY__ENV__DATABASE_PORT:-~}
database_name: ${SYMFONY__ENV__DATABASE_NAME:-symfony}
database_user: ${SYMFONY__ENV__DATABASE_USER:-root}
database_password: ${SYMFONY__ENV__DATABASE_PASSWORD:-~}
database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite"
database_table_prefix: wallabag_
database_socket: null
database_charset: ${SYMFONY__ENV__DATABASE_CHARSET:-utf8}
domain_name: ${SYMFONY__ENV__DOMAIN_NAME:-https://your-wallabag-url-instance.com}
server_name: ${SYMFONY__ENV__SERVER_NAME:-"Your wallabag instance"}
mailer_transport: ${SYMFONY__ENV__MAILER_TRANSPORT:-smtp}
mailer_user: ${SYMFONY__ENV__MAILER_USER:-~}
mailer_password: ${SYMFONY__ENV__MAILER_PASSWORD:-~}
mailer_host: ${SYMFONY__ENV__MAILER_HOST:-127.0.0.1}
mailer_port: ${SYMFONY__ENV__MAILER_PORT:-25}
mailer_encryption: ${SYMFONY__ENV__MAILER_ENCRYPTION:-~}
mailer_auth_mode: ${SYMFONY__ENV__MAILER_AUTH_MODE:-~}
locale: ${SYMFONY__ENV__LOCALE:-en}
# A secret key that's used to generate certain security-related tokens
secret: ${SYMFONY__ENV__SECRET:-~}
# two factor stuff
twofactor_auth: ${SYMFONY__ENV__TWOFACTOR_AUTH:-true}
twofactor_sender: ${SYMFONY__ENV__TWOFACTOR_SENDER:-no-reply@wallabag.org}
# fosuser stuff
fosuser_registration: ${SYMFONY__ENV__FOSUSER_REGISTRATION:-true}
fosuser_confirmation: ${SYMFONY__ENV__FOSUSER_CONFIRMATION:-true}
fos_oauth_server_access_token_lifetime: 3600
fos_oauth_server_refresh_token_lifetime: 1209600
from_email: ${SYMFONY__ENV__FROM_EMAIL:-wallabag@example.com}
rss_limit: 50
# RabbitMQ processing
rabbitmq_host: localhost
rabbitmq_port: 5672
rabbitmq_user: guest
rabbitmq_password: guest
rabbitmq_prefetch_count: 10
# Redis processing
redis_scheme: ${SYMFONY__ENV__REDIS_SCHEME:-tcp}
redis_host: ${SYMFONY__ENV__REDIS_HOST:-redis}
redis_port: ${SYMFONY__ENV__REDIS_PORT:-6379}
redis_path: ${SYMFONY__ENV__REDIS_PATH:-~}
redis_password: ${SYMFONY__ENV__REDIS_PASSWORD:-~}
# Sentry
sentry_dsn: ${SYMFONY__ENV__SENTRY_DSN:-~}
session_handler: ${SESSION_HANDLER:-session.handler.native_file}

17
config/wallabag-php.ini Normal file
View File

@@ -0,0 +1,17 @@
memory_limit = ${PHP_MEMORY_LIMIT:-512M}
max_execution_time = ${PHP_MAX_EXECUTION_TIME:-60}
date.time = ${PHP_TIMEZONE:-Europe/Paris}
display_errors = off
session.save_handler = redis
session.save_path = "tcp://${PHP_SESSION_REDIS_HOST}:6379?database=2"
opcache.enable=1
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.memory_consumption=128
opcache.save_comments=1
opcache.revalidate_freq=1

6
entrypoint.sh Executable file
View File

@@ -0,0 +1,6 @@
#!/bin/sh
envsubst < /opt/wallabag/config/wallabag-php.ini > /usr/local/etc/php/conf.d/wallabag-php.ini
envsubst < /opt/wallabag/config/parameters.yml > /var/www/html/app/config/parameters.yml
exec "$@"

0
patches/.keep Normal file
View File

View File

@@ -1,8 +0,0 @@
#!/bin/sh
if [ "$1" = "wallabag" ];then
ansible-playbook -i /etc/ansible/hosts /etc/ansible/entrypoint.yml -c local
exec s6-svscan /etc/s6/
fi
exec "$@"

View File

@@ -1,121 +0,0 @@
---
- hosts: localhost
remote_user: root
vars:
database_driver: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_DRIVER') }}"
database_host: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_HOST') }}"
database_name: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_NAME') }}"
database_password: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_PASSWORD') }}"
database_port: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_PORT') }}"
database_root_password_mariadb: "{{ lookup('env', 'MYSQL_ROOT_PASSWORD') }}"
database_root_password_postgres: "{{ lookup('env', 'POSTGRES_PASSWORD') }}"
database_user: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_USER') }}"
tasks:
- name: needed dirs
file:
path={{ item }}
state=directory
with_items:
- /var/www/wallabag/data/db
- /var/www/wallabag/data/assets
notify: chown dir
- stat:
path=/var/www/wallabag/data/db/wallabag.sqlite
register: wallabag_sqlite_db
when: database_driver == 'pdo_sqlite'
- name: notify install for sqlite
debug:
msg='notify installation script if sqlite db does not exist'
changed_when: true
notify: run install
when: (database_driver == 'pdo_sqlite') and
(wallabag_sqlite_db.stat.exists == False)
- name: wait for db container
wait_for:
host="{{ database_host }}"
port="{{ database_port }}"
when: (database_driver == 'pdo_mysql') or
(database_driver == 'pdo_pgsql')
- name: add mariadb db
mysql_db:
name="{{ database_name }}"
state=present
login_host="{{ database_host }}"
login_port={{ database_port }}
login_user=root
login_password="{{ database_root_password_mariadb }}"
notify: run install
when: database_driver == 'pdo_mysql'
- name: add mariadb user
mysql_user:
name="{{ database_user }}"
host=%
password="{{ database_password }}"
priv={{ database_name }}.*:ALL
login_host="{{ database_host }}"
login_port={{ database_port }}
login_user=root
login_password="{{ database_root_password_mariadb }}"
state=present
when: (database_driver == 'pdo_mysql') and
(database_user != 'root')
- name: postgresql db
postgresql_db:
name="{{ database_name }}"
state=present
login_host="{{ database_host }}"
port={{ database_port }}
login_user=postgres
login_password="{{ database_root_password_postgres }}"
notify: run install
when: database_driver == 'pdo_pgsql'
- name: add postgresql user
postgresql_user:
name="{{ database_user }}"
password="{{ database_password }}"
db={{ database_name }}
priv=ALL
login_host="{{ database_host }}"
port={{ database_port }}
login_user=postgres
login_password="{{ database_root_password_postgres }}"
state=present
when: (database_driver == 'pdo_pgsql') and
(database_user != 'postgres')
- name: remove cache
file:
path=/var/www/wallabag/var/cache
state=absent
- name: run composer
shell: SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist
args:
chdir: /var/www/wallabag
notify: chown dir
handlers:
- name: run install
shell: php bin/console wallabag:install --env=prod -n
args:
chdir: /var/www/wallabag
notify: chown dir
- name: chown dir
file:
path=/var/www/wallabag
recurse=yes
owner=nobody
group=nobody

View File

@@ -1,2 +0,0 @@
[localhost]
localhost

View File

@@ -1,25 +0,0 @@
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REQUEST_SCHEME $scheme;
fastcgi_param HTTPS $https if_not_empty;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;

View File

@@ -1,66 +0,0 @@
user nginx;
worker_processes 1;
pid /var/run/nginx.pid;
events {
worker_connections 2048;
multi_accept on;
use epoll;
}
http {
server_tokens off;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 15;
types_hash_max_size 2048;
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log off;
error_log off;
gzip on;
gzip_disable "msie6";
open_file_cache max=100;
upstream php-upstream {
server 127.0.0.1:9000;
}
server {
server_name _;
root /var/www/wallabag/web;
location / {
# try to serve file directly, fallback to app.php
try_files $uri /app.php$is_args$args;
}
location ~ ^/app\.php(/|$) {
fastcgi_pass php-upstream;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
# When you are using symlinks to link the document root to the
# current version of your application, you should pass the real
# application path instead of the path to the symlink to PHP
# FPM.
# Otherwise, PHP's OPcache may not properly detect changes to
# your PHP files (see https://github.com/zendtech/ZendOptimizerPlus/issues/126
# for more information).
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
# Prevents URIs that include the front controller. This will 404:
# http://domain.tld/app.php/some-path
# Remove the internal directive to allow URIs like this
internal;
}
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
}
}
daemon off;

View File

@@ -1,537 +0,0 @@
;;;;;;;;;;;;;;;;;;;;;
; FPM Configuration ;
;;;;;;;;;;;;;;;;;;;;;
; All relative paths in this configuration file are relative to PHP's install
; prefix (/usr). This prefix can be dynamically changed by using the
; '-p' argument from the command line.
; Include one or more files. If glob(3) exists, it is used to include a bunch of
; files from a glob(3) pattern. This directive can be used everywhere in the
; file.
; Relative path can also be used. They will be prefixed by:
; - the global prefix if it's been set (-p argument)
; - /usr otherwise
;include=etc/fpm.d/*.conf
;;;;;;;;;;;;;;;;;;
; Global Options ;
;;;;;;;;;;;;;;;;;;
[global]
; Pid file
; Note: the default prefix is /var
; Default Value: none
;pid = run/php-fpm.pid
; Error log file
; If it's set to "syslog", log is sent to syslogd instead of being written
; in a local file.
; Note: the default prefix is /var
; Default Value: log/php-fpm.log
error_log = /var/log/php-fpm.log
; syslog_facility is used to specify what type of program is logging the
; message. This lets syslogd specify that messages from different facilities
; will be handled differently.
; See syslog(3) for possible values (ex daemon equiv LOG_DAEMON)
; Default Value: daemon
;syslog.facility = daemon
; syslog_ident is prepended to every message. If you have multiple FPM
; instances running on the same server, you can change the default value
; which must suit common needs.
; Default Value: php-fpm
;syslog.ident = php-fpm
; Log level
; Possible Values: alert, error, warning, notice, debug
; Default Value: notice
;log_level = notice
; If this number of child processes exit with SIGSEGV or SIGBUS within the time
; interval set by emergency_restart_interval then FPM will restart. A value
; of '0' means 'Off'.
; Default Value: 0
;emergency_restart_threshold = 0
; Interval of time used by emergency_restart_interval to determine when
; a graceful restart will be initiated. This can be useful to work around
; accidental corruptions in an accelerator's shared memory.
; Available Units: s(econds), m(inutes), h(ours), or d(ays)
; Default Unit: seconds
; Default Value: 0
;emergency_restart_interval = 0
; Time limit for child processes to wait for a reaction on signals from master.
; Available units: s(econds), m(inutes), h(ours), or d(ays)
; Default Unit: seconds
; Default Value: 0
;process_control_timeout = 0
; The maximum number of processes FPM will fork. This has been design to control
; the global number of processes when using dynamic PM within a lot of pools.
; Use it with caution.
; Note: A value of 0 indicates no limit
; Default Value: 0
; process.max = 128
; Specify the nice(2) priority to apply to the master process (only if set)
; The value can vary from -19 (highest priority) to 20 (lower priority)
; Note: - It will only work if the FPM master process is launched as root
; - The pool process will inherit the master process priority
; unless it specified otherwise
; Default Value: no set
; process.priority = -19
; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
; Default Value: yes
;daemonize = yes
; Set open file descriptor rlimit for the master process.
; Default Value: system defined value
;rlimit_files = 1024
; Set max core size rlimit for the master process.
; Possible Values: 'unlimited' or an integer greater or equal to 0
; Default Value: system defined value
;rlimit_core = 0
; Specify the event mechanism FPM will use. The following is available:
; - select (any POSIX os)
; - poll (any POSIX os)
; - epoll (linux >= 2.5.44)
; - kqueue (FreeBSD >= 4.1, OpenBSD >= 2.9, NetBSD >= 2.0)
; - /dev/poll (Solaris >= 7)
; - port (Solaris >= 10)
; Default Value: not set (auto detection)
;events.mechanism = epoll
; When FPM is build with systemd integration, specify the interval,
; in second, between health report notification to systemd.
; Set to 0 to disable.
; Available Units: s(econds), m(inutes), h(ours)
; Default Unit: seconds
; Default value: 10
;systemd_interval = 10
;;;;;;;;;;;;;;;;;;;;
; Pool Definitions ;
;;;;;;;;;;;;;;;;;;;;
; Multiple pools of child processes may be started with different listening
; ports and different management options. The name of the pool will be
; used in logs and stats. There is no limitation on the number of pools which
; FPM can handle. Your system will tell you anyway :)
; Start a new pool named 'www'.
; the variable $pool can we used in any directive and will be replaced by the
; pool name ('www' here)
[www]
; Per pool prefix
; It only applies on the following directives:
; - 'access.log'
; - 'slowlog'
; - 'listen' (unixsocket)
; - 'chroot'
; - 'chdir'
; - 'php_values'
; - 'php_admin_values'
; When not set, the global prefix (or /usr) applies instead.
; Note: This directive can also be relative to the global prefix.
; Default Value: none
;prefix = /path/to/pools/$pool
; Unix user/group of processes
; Note: The user is mandatory. If the group is not set, the default user's group
; will be used.
user = nobody
group = nobody
; The address on which to accept FastCGI requests.
; Valid syntaxes are:
; 'ip.add.re.ss:port' - to listen on a TCP socket to a specific IPv4 address on
; a specific port;
; '[ip:6:addr:ess]:port' - to listen on a TCP socket to a specific IPv6 address on
; a specific port;
; 'port' - to listen on a TCP socket to all IPv4 addresses on a
; specific port;
; '[::]:port' - to listen on a TCP socket to all addresses
; (IPv6 and IPv4-mapped) on a specific port;
; '/path/to/unix/socket' - to listen on a unix socket.
; Note: This value is mandatory.
listen = 127.0.0.1:9000
; Set listen(2) backlog.
; Default Value: 65535 (-1 on FreeBSD and OpenBSD)
;listen.backlog = 65535
; Set permissions for unix socket, if one is used. In Linux, read/write
; permissions must be set in order to allow connections from a web server. Many
; BSD-derived systems allow connections regardless of permissions.
; Default Values: user and group are set as the running user
; mode is set to 0660
;listen.owner = nobody
;listen.group = nobody
;listen.mode = 0660
; When POSIX Access Control Lists are supported you can set them using
; these options, value is a comma separated list of user/group names.
; When set, listen.owner and listen.group are ignored
;listen.acl_users =
;listen.acl_groups =
; List of addresses (IPv4/IPv6) of FastCGI clients which are allowed to connect.
; Equivalent to the FCGI_WEB_SERVER_ADDRS environment variable in the original
; PHP FCGI (5.2.2+). Makes sense only with a tcp listening socket. Each address
; must be separated by a comma. If this value is left blank, connections will be
; accepted from any ip address.
; Default Value: any
;listen.allowed_clients = 127.0.0.1
; Specify the nice(2) priority to apply to the pool processes (only if set)
; The value can vary from -19 (highest priority) to 20 (lower priority)
; Note: - It will only work if the FPM master process is launched as root
; - The pool processes will inherit the master process priority
; unless it specified otherwise
; Default Value: no set
; process.priority = -19
; Choose how the process manager will control the number of child processes.
; Possible Values:
; static - a fixed number (pm.max_children) of child processes;
; dynamic - the number of child processes are set dynamically based on the
; following directives. With this process management, there will be
; always at least 1 children.
; pm.max_children - the maximum number of children that can
; be alive at the same time.
; pm.start_servers - the number of children created on startup.
; pm.min_spare_servers - the minimum number of children in 'idle'
; state (waiting to process). If the number
; of 'idle' processes is less than this
; number then some children will be created.
; pm.max_spare_servers - the maximum number of children in 'idle'
; state (waiting to process). If the number
; of 'idle' processes is greater than this
; number then some children will be killed.
; ondemand - no children are created at startup. Children will be forked when
; new requests will connect. The following parameter are used:
; pm.max_children - the maximum number of children that
; can be alive at the same time.
; pm.process_idle_timeout - The number of seconds after which
; an idle process will be killed.
; Note: This value is mandatory.
pm = dynamic
; The number of child processes to be created when pm is set to 'static' and the
; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
; This value sets the limit on the number of simultaneous requests that will be
; served. Equivalent to the ApacheMaxClients directive with mpm_prefork.
; Equivalent to the PHP_FCGI_CHILDREN environment variable in the original PHP
; CGI. The below defaults are based on a server without much resources. Don't
; forget to tweak pm.* to fit your needs.
; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
; Note: This value is mandatory.
pm.max_children = 5
; The number of child processes created on startup.
; Note: Used only when pm is set to 'dynamic'
; Default Value: min_spare_servers + (max_spare_servers - min_spare_servers) / 2
pm.start_servers = 2
; The desired minimum number of idle server processes.
; Note: Used only when pm is set to 'dynamic'
; Note: Mandatory when pm is set to 'dynamic'
pm.min_spare_servers = 1
; The desired maximum number of idle server processes.
; Note: Used only when pm is set to 'dynamic'
; Note: Mandatory when pm is set to 'dynamic'
pm.max_spare_servers = 3
; The number of seconds after which an idle process will be killed.
; Note: Used only when pm is set to 'ondemand'
; Default Value: 10s
;pm.process_idle_timeout = 10s;
; The number of requests each child process should execute before respawning.
; This can be useful to work around memory leaks in 3rd party libraries. For
; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
; Default Value: 0
;pm.max_requests = 500
; The URI to view the FPM status page. If this value is not set, no URI will be
; recognized as a status page. It shows the following informations:
; pool - the name of the pool;
; process manager - static, dynamic or ondemand;
; start time - the date and time FPM has started;
; start since - number of seconds since FPM has started;
; accepted conn - the number of request accepted by the pool;
; listen queue - the number of request in the queue of pending
; connections (see backlog in listen(2));
; max listen queue - the maximum number of requests in the queue
; of pending connections since FPM has started;
; listen queue len - the size of the socket queue of pending connections;
; idle processes - the number of idle processes;
; active processes - the number of active processes;
; total processes - the number of idle + active processes;
; max active processes - the maximum number of active processes since FPM
; has started;
; max children reached - number of times, the process limit has been reached,
; when pm tries to start more children (works only for
; pm 'dynamic' and 'ondemand');
; Value are updated in real time.
; Example output:
; pool: www
; process manager: static
; start time: 01/Jul/2011:17:53:49 +0200
; start since: 62636
; accepted conn: 190460
; listen queue: 0
; max listen queue: 1
; listen queue len: 42
; idle processes: 4
; active processes: 11
; total processes: 15
; max active processes: 12
; max children reached: 0
;
; By default the status page output is formatted as text/plain. Passing either
; 'html', 'xml' or 'json' in the query string will return the corresponding
; output syntax. Example:
; http://www.foo.bar/status
; http://www.foo.bar/status?json
; http://www.foo.bar/status?html
; http://www.foo.bar/status?xml
;
; By default the status page only outputs short status. Passing 'full' in the
; query string will also return status for each pool process.
; Example:
; http://www.foo.bar/status?full
; http://www.foo.bar/status?json&full
; http://www.foo.bar/status?html&full
; http://www.foo.bar/status?xml&full
; The Full status returns for each process:
; pid - the PID of the process;
; state - the state of the process (Idle, Running, ...);
; start time - the date and time the process has started;
; start since - the number of seconds since the process has started;
; requests - the number of requests the process has served;
; request duration - the duration in µs of the requests;
; request method - the request method (GET, POST, ...);
; request URI - the request URI with the query string;
; content length - the content length of the request (only with POST);
; user - the user (PHP_AUTH_USER) (or '-' if not set);
; script - the main script called (or '-' if not set);
; last request cpu - the %cpu the last request consumed
; it's always 0 if the process is not in Idle state
; because CPU calculation is done when the request
; processing has terminated;
; last request memory - the max amount of memory the last request consumed
; it's always 0 if the process is not in Idle state
; because memory calculation is done when the request
; processing has terminated;
; If the process is in Idle state, then informations are related to the
; last request the process has served. Otherwise informations are related to
; the current request being served.
; Example output:
; ************************
; pid: 31330
; state: Running
; start time: 01/Jul/2011:17:53:49 +0200
; start since: 63087
; requests: 12808
; request duration: 1250261
; request method: GET
; request URI: /test_mem.php?N=10000
; content length: 0
; user: -
; script: /home/fat/web/docs/php/test_mem.php
; last request cpu: 0.00
; last request memory: 0
;
; Note: There is a real-time FPM status monitoring sample web page available
; It's available in: /usr/share/php/fpm/status.html
;
; Note: The value must start with a leading slash (/). The value can be
; anything, but it may not be a good idea to use the .php extension or it
; may conflict with a real PHP file.
; Default Value: not set
;pm.status_path = /status
; The ping URI to call the monitoring page of FPM. If this value is not set, no
; URI will be recognized as a ping page. This could be used to test from outside
; that FPM is alive and responding, or to
; - create a graph of FPM availability (rrd or such);
; - remove a server from a group if it is not responding (load balancing);
; - trigger alerts for the operating team (24/7).
; Note: The value must start with a leading slash (/). The value can be
; anything, but it may not be a good idea to use the .php extension or it
; may conflict with a real PHP file.
; Default Value: not set
;ping.path = /ping
; This directive may be used to customize the response of a ping request. The
; response is formatted as text/plain with a 200 response code.
; Default Value: pong
;ping.response = pong
; The access log file
; Default: not set
;access.log = log/$pool.access.log
; The access log format.
; The following syntax is allowed
; %%: the '%' character
; %C: %CPU used by the request
; it can accept the following format:
; - %{user}C for user CPU only
; - %{system}C for system CPU only
; - %{total}C for user + system CPU (default)
; %d: time taken to serve the request
; it can accept the following format:
; - %{seconds}d (default)
; - %{miliseconds}d
; - %{mili}d
; - %{microseconds}d
; - %{micro}d
; %e: an environment variable (same as $_ENV or $_SERVER)
; it must be associated with embraces to specify the name of the env
; variable. Some exemples:
; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
; %f: script filename
; %l: content-length of the request (for POST request only)
; %m: request method
; %M: peak of memory allocated by PHP
; it can accept the following format:
; - %{bytes}M (default)
; - %{kilobytes}M
; - %{kilo}M
; - %{megabytes}M
; - %{mega}M
; %n: pool name
; %o: output header
; it must be associated with embraces to specify the name of the header:
; - %{Content-Type}o
; - %{X-Powered-By}o
; - %{Transfert-Encoding}o
; - ....
; %p: PID of the child that serviced the request
; %P: PID of the parent of the child that serviced the request
; %q: the query string
; %Q: the '?' character if query string exists
; %r: the request URI (without the query string, see %q and %Q)
; %R: remote IP address
; %s: status (response code)
; %t: server time the request was received
; it can accept a strftime(3) format:
; %d/%b/%Y:%H:%M:%S %z (default)
; %T: time the log has been written (the request has finished)
; it can accept a strftime(3) format:
; %d/%b/%Y:%H:%M:%S %z (default)
; %u: remote user
;
; Default: "%R - %u %t \"%m %r\" %s"
;access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
; The log file for slow requests
; Default Value: not set
; Note: slowlog is mandatory if request_slowlog_timeout is set
;slowlog = log/$pool.log.slow
; The timeout for serving a single request after which a PHP backtrace will be
; dumped to the 'slowlog' file. A value of '0s' means 'off'.
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
; Default Value: 0
;request_slowlog_timeout = 0
; The timeout for serving a single request after which the worker process will
; be killed. This option should be used when the 'max_execution_time' ini option
; does not stop script execution for some reason. A value of '0' means 'off'.
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
; Default Value: 0
;request_terminate_timeout = 0
; Set open file descriptor rlimit.
; Default Value: system defined value
;rlimit_files = 1024
; Set max core size rlimit.
; Possible Values: 'unlimited' or an integer greater or equal to 0
; Default Value: system defined value
;rlimit_core = 0
; Chroot to this directory at the start. This value must be defined as an
; absolute path. When this value is not set, chroot is not used.
; Note: you can prefix with '$prefix' to chroot to the pool prefix or one
; of its subdirectories. If the pool prefix is not set, the global prefix
; will be used instead.
; Note: chrooting is a great security feature and should be used whenever
; possible. However, all PHP paths will be relative to the chroot
; (error_log, sessions.save_path, ...).
; Default Value: not set
;chroot =
; Chdir to this directory at the start.
; Note: relative path can be used.
; Default Value: current directory or / when chroot
;chdir = /var/www
; Redirect worker stdout and stderr into main error log. If not set, stdout and
; stderr will be redirected to /dev/null according to FastCGI specs.
; Note: on highloaded environement, this can cause some delay in the page
; process time (several ms).
; Default Value: no
;catch_workers_output = yes
; Clear environment in FPM workers
; Prevents arbitrary environment variables from reaching FPM worker processes
; by clearing the environment in workers before env vars specified in this
; pool configuration are added.
; Setting to "no" will make all environment variables available to PHP code
; via getenv(), $_ENV and $_SERVER.
; Default Value: yes
;clear_env = no
; Limits the extensions of the main script FPM will allow to parse. This can
; prevent configuration mistakes on the web server side. You should only limit
; FPM to .php extensions to prevent malicious users to use other extensions to
; exectute php code.
; Note: set an empty value to allow all extensions.
; Default Value: .php
;security.limit_extensions = .php .php3 .php4 .php5
; Pass environment variables like LD_LIBRARY_PATH. All $VARIABLEs are taken from
; the current environment.
; Default Value: clean env
;env[HOSTNAME] = $HOSTNAME
env[PATH] = /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
;env[TMP] = /tmp
;env[TMPDIR] = /tmp
;env[TEMP] = /tmp
; Additional php.ini defines, specific to this pool of workers. These settings
; overwrite the values previously defined in the php.ini. The directives are the
; same as the PHP SAPI:
; php_value/php_flag - you can set classic ini defines which can
; be overwritten from PHP call 'ini_set'.
; php_admin_value/php_admin_flag - these directives won't be overwritten by
; PHP call 'ini_set'
; For php_*flag, valid values are on, off, 1, 0, true, false, yes or no.
; Defining 'extension' will load the corresponding shared extension from
; extension_dir. Defining 'disable_functions' or 'disable_classes' will not
; overwrite previously defined php.ini values, but will append the new value
; instead.
; Note: path INI options can be relative and will be expanded with the prefix
; (pool, global or /usr)
; Default Value: nothing is defined by default except the values in php.ini and
; specified at startup with the -d argument
;php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f www@my.domain.com
;php_flag[display_errors] = off
;php_admin_value[error_log] = /var/log/fpm-php.www.log
;php_admin_flag[log_errors] = on
;php_admin_value[memory_limit] = 32M

File diff suppressed because it is too large Load Diff

View File

@@ -1,2 +0,0 @@
#!/bin/sh
exec /bin/true

View File

@@ -1,3 +0,0 @@
#!/bin/sh
exec nginx -c /etc/nginx/nginx.conf

View File

@@ -1,2 +0,0 @@
#!/bin/sh
exec /bin/true

View File

@@ -1,3 +0,0 @@
#!/bin/sh
exec php-fpm7 -F

View File

@@ -1,36 +0,0 @@
parameters:
database_driver: %env.database_driver%
database_host: %env.database_host%
database_port: %env.database_port%
database_name: %env.database_name%
database_user: %env.database_user%
database_password: %env.database_password%
database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite"
database_table_prefix: wallabag_
test_database_driver: pdo_sqlite
test_database_host: 127.0.0.1
test_database_port: ~
test_database_name: ~
test_database_user: ~
test_database_password: ~
test_database_path: "%kernel.root_dir%/../data/db/wallabag_test.sqlite"
mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_user: ~
mailer_password: ~
locale: en
# A secret key that's used to generate certain security-related tokens
secret: %env.secret%
# two factor stuff
twofactor_auth: true
twofactor_sender: no-reply@wallabag.org
# fosuser stuff
fosuser_confirmation: true
from_email: no-reply@wallabag.org

View File

@@ -0,0 +1,9 @@
version: '2'
services:
wallabag:
build:
context: ../
image: wallabag:default
container_name: wallabag
ports:
- "127.0.0.1:80:80"

View File

@@ -0,0 +1,23 @@
version: '2'
services:
wallabag:
build:
context: ../
image: wallabag:mariadb
container_name: wallabag
environment:
- MYSQL_ROOT_PASSWORD=wallaroot
- SYMFONY__ENV__SECRET=F00B4R
- SYMFONY__ENV__DATABASE_DRIVER=pdo_mysql
- SYMFONY__ENV__DATABASE_HOST=db
- SYMFONY__ENV__DATABASE_PORT=3306
- SYMFONY__ENV__DATABASE_NAME=wallabag
- SYMFONY__ENV__DATABASE_USER=wallabag
- SYMFONY__ENV__DATABASE_PASSWORD=wallapass
ports:
- "127.0.0.1:80:80"
db:
image: mariadb
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --character-set-client-handshake=FALSE
environment:
- MYSQL_ROOT_PASSWORD=wallaroot

View File

@@ -0,0 +1,24 @@
version: '2'
services:
wallabag:
build:
context: ../
image: wallabag:postgresql
container_name: wallabag
environment:
- POSTGRES_PASSWORD=my-secret-pw
- POSTGRES_USER=my-super-user
- SYMFONY__ENV__SECRET=F00B4R
- SYMFONY__ENV__DATABASE_DRIVER=pdo_pgsql
- SYMFONY__ENV__DATABASE_HOST=db
- SYMFONY__ENV__DATABASE_PORT=5432
- SYMFONY__ENV__DATABASE_NAME=wallabag
- SYMFONY__ENV__DATABASE_USER=wallabag
- SYMFONY__ENV__DATABASE_PASSWORD=wallapass
ports:
- "127.0.0.1:80:80"
db:
image: postgres:10.3
environment:
- POSTGRES_PASSWORD=my-secret-pw
- POSTGRES_USER=my-super-user

View File

@@ -0,0 +1,17 @@
version: '2'
services:
wallabag:
build:
context: ../
image: wallabag:sqlite
container_name: wallabag
environment:
- SYMFONY__ENV__DATABASE_DRIVER=pdo_sqlite
- SYMFONY__ENV__DATABASE_HOST=127.0.0.1
- SYMFONY__ENV__DATABASE_PORT=~
- SYMFONY__ENV__DATABASE_NAME=symfony
- SYMFONY__ENV__DATABASE_USER=root
- SYMFONY__ENV_DATABASE_PASSWORD=~
- SYMFONY__ENV__SECRET=F00B4R
ports:
- "127.0.0.1:80:80"

47
tests/test_login.py Normal file
View File

@@ -0,0 +1,47 @@
import pytest
import re
import requests
URL = 'http://127.0.0.1:80'
def test_accessing_login_page():
r = requests.get(URL, allow_redirects=True)
assert r.status_code == 200
assert 'Log in' in r.text
assert 'Password' in r.text
assert 'Register' in r.text
assert 'Username' in r.text
def test_logging_in():
client = requests.session()
r = client.get(URL, allow_redirects=True)
jar = r.cookies
# get csrf token
csrf_match = re.search(
'<input type="hidden" name="_csrf_token" value="(.*)" />',
r.text
)
if csrf_match:
csrf = csrf_match.group(1)
else:
# if there is no csrf token the test will fail
pytest.fail('csrf not matched')
data = {
'_username': 'wallabag',
'_password': 'wallabag',
'_csrf_token': csrf
}
r = client.post(URL + '/login_check', cookies=jar, data=data)
assert r.status_code == 200
assert '/unread/list' in r.text
assert '/starred/list' in r.text
assert '/archive/list' in r.text
assert '/all/list' in r.text