Compare commits

...

253 Commits
2.0.6 ... 2.6.7

Author SHA1 Message Date
919f82516c Merge pull request #384 from wallabag/release/2.6.7
Prepare 2.6.7
2023-10-02 14:32:24 +02:00
2515407009 Prepare 2.6.7 2023-10-02 14:30:58 +02:00
9241c7d799 Merge pull request #375 from wallabag/release/2.6.6
Prepare 2.6.6
2023-09-07 09:29:54 +02:00
18d9f742fb Prepare 2.6.6 2023-09-07 09:29:14 +02:00
b5d9ba681c Merge pull request #372 from wallabag/release/2.6.5
2.6.5
2023-08-28 10:38:22 +02:00
746c6e682b 2.6.5 2023-08-28 10:36:30 +02:00
4f406f1f1f Merge pull request #365 from wallabag/nicosomb-patch-1
Update Dockerfile for 2.6.4
2023-08-22 15:50:15 +02:00
7edde03f39 Update Dockerfile for 2.6.4 2023-08-22 15:45:19 +02:00
4b4eb85eb1 Merge pull request #363 from wallabag/nicosomb-patch-1
Update Dockerfile for wallabag 2.6.3
2023-08-21 12:18:25 +02:00
7ac0c31dc1 Merge pull request #360 from yguedidi/get-composer-from-official-image
Get composer from official image
2023-08-21 12:12:17 +02:00
854d1027b8 Update Dockerfile for wallabag 2.6.3 2023-08-21 12:07:33 +02:00
f4517471db Get composer from official image 2023-08-15 18:21:29 +02:00
abb6a98924 Merge pull request #361 from yguedidi/rename-root_dir-to-project_dir
Rename root_dir to project_dir
2023-08-14 07:52:51 +02:00
624616cd9e Rename root_dir to project_dir 2023-08-13 11:48:06 +02:00
d6ce0cea67 Merge pull request #344 from STaRDoGG/patch-1
Change default workdir
2023-07-24 15:31:15 +02:00
673dea7800 Merge branch 'master' into patch-1 2023-07-24 07:56:12 -05:00
d21d9c6260 Merge pull request #355 from wallabag/update-readme
Update README
2023-07-24 13:42:23 +02:00
886535f767 Update Dockerfile for wallabag 2.6.2 2023-07-24 13:15:37 +02:00
1ad213de86 Update README 2023-07-24 13:11:12 +02:00
3538a3c8d7 Merge pull request #345 from STaRDoGG/patch-2
Add wallabag/bin to PATH
2023-07-24 10:32:36 +02:00
92fcba3557 Merge pull request #354 from wallabag/alpine318
Update base alpine to 3.18
2023-07-24 10:31:52 +02:00
98ed4730b3 drop: run tests on master
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2023-07-22 18:34:12 +02:00
c0c280b606 Update base alpine to 3.18
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2023-07-22 18:32:38 +02:00
5790e0d029 Merge pull request #353 from wallabag/fix/logs
tests: always run ci steps for logs and cleanup
2023-07-22 18:31:10 +02:00
e61cbdb025 Merge pull request #352 from wallabag/nicosomb-patch-1
Remove 2fa parameter
2023-07-22 17:55:29 +02:00
c12a84557a tests: always run ci steps for logs and cleanup
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2023-07-22 17:46:33 +02:00
835e9ad84b Remove 2fa parameter 2023-07-22 17:34:17 +02:00
d5aac3e6ed Merge pull request #351 from wallabag/impr/pytest
tests: move docker service start in pytest
2023-07-22 17:33:32 +02:00
e38f9adb8b tests: move docker service start in pytest
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2023-07-22 17:17:11 +02:00
b6db602ece Update Dockerfile
Add Wallabag bin path to environment path so it's commands (i.e console cache:clear --env=prod) can be run from anywhere.
2023-06-28 20:09:05 -05:00
659a8f4d3f Update Dockerfile
Sets the workdir to navigate to the wallabag folder when entering.

Makes it much easier to not have to always drill all the way down each time you first shell in.
2023-06-28 12:27:54 -05:00
62d1948e15 Merge pull request #336 from wallabag/nicosomb-patch-1
2.6.1
2023-06-21 13:45:25 +02:00
a025d243d1 Fix mariadb launch 2023-06-21 13:39:51 +02:00
fb13655def Handle mailer_dsn 2023-06-21 10:45:24 +02:00
de07417e8f Update domain name 2023-06-21 09:56:30 +02:00
b34d71355d Relax composer
We don't need a fixed version of Composer now (as we updated most packages on wallabag)
2023-06-21 09:26:11 +02:00
8bc63c22ec Update Dockerfile 2023-06-21 07:27:14 +02:00
676572b8fe Update dependencies 2023-06-20 18:16:17 +02:00
d51cc9fe33 Update Dockerfile to 2.6.0 2023-06-20 18:07:13 +02:00
5c52eee713 Merge pull request #319 from wallabag/release/2.5.4
2.5.4
2023-02-07 22:28:01 +01:00
e2717ea9a9 2.5.4
See https://github.com/wallabag/wallabag/releases/tag/2.5.4
2023-02-07 22:25:16 +01:00
185b063ca2 Merge pull request #315 from wallabag/release/2.5.3
2.5.3
2023-02-01 10:22:30 +01:00
a298ff95f7 2.5.3 2023-02-01 10:19:37 +01:00
68c2e88e88 Merge pull request #313 from ngosang/feature/config 2023-01-02 06:49:45 +01:00
2b75993504 Fix PHP 8.1 configuration 2022-12-30 20:27:52 +01:00
88d24aee30 Merge pull request #310 from ngosang/feature/alpine
Update Alpine 3.17 and PHP 8.1
2022-11-30 14:00:38 -08:00
b10121989c Update Alpine 3.17 and PHP 8.1 2022-11-30 00:24:03 +01:00
74bfdfa5c7 Merge pull request #307 from ngosang/feature/ansible
Replace Ansible with Shell script
2022-11-13 15:17:33 +01:00
229cb3d017 Replace Ansible with Shell script
* Remove Ansible and all Python packages
* Reduce image size by 456 MB (689 MB => 233 MB uncompressed)
* Fixes some open issues, for example, root password is not required if the database already exists.
* Show install and startup traces (traces and errors were hidden by Ansible)
2022-11-13 14:41:04 +01:00
30c372025e Merge pull request #308 from ngosang/feature/actions
Update Python version in GitHub Actions
2022-11-02 09:56:41 +01:00
4c4aa852c1 Merge pull request #309 from ngosang/feature/composer
Update Composer 2.2.18
2022-11-02 09:56:11 +01:00
2603775b01 Update Composer 2.2.18 2022-10-29 13:39:37 +02:00
3f4a4c7625 Update Python version in GitHub Actions 2022-10-29 02:51:41 +02:00
ae9214ea87 Merge pull request #306 from ngosang/feature/iconv 2022-10-28 19:05:17 +02:00
f92efc56d6 Remove fix for gnu-libiconv (already fixed in Alpine 3.16) 2022-10-28 16:18:26 +02:00
695212dacb Merge pull request #265 from hwiorn/fix-nginx-conf-for-reverse-proxy-with-https
Fix nginx.conf for reverse-proxy with HTTPS
2022-10-28 14:05:11 +02:00
bf0102ece6 Fix default value of fe_https for non-reverse-proxy compatibility 2022-10-28 14:01:09 +02:00
054677bb02 Fix nginx.conf for reverse-proxy with HTTPS 2022-10-28 14:01:09 +02:00
43a26d7406 Merge pull request #302 from ngosang/feature/alpine
Update Alpine 3.16
2022-10-28 14:00:04 +02:00
ecb1ed2793 Merge pull request #301 from ngosang/feature/bash
Remove Bash and Make packages
2022-10-28 13:59:02 +02:00
104373da6d Update Alpine 3.16 2022-10-28 12:51:17 +02:00
080b97130b Merge branch 'master' into feature/bash 2022-10-28 12:44:35 +02:00
115c83794a Merge pull request #299 from ngosang/feature/php8
Update PHP 8.0
2022-10-28 09:45:12 +02:00
e6a8421274 Merge pull request #305 from wallabag/fix/database_table_prefix
Add ability to define `database_table_prefix`
2022-10-28 09:44:29 +02:00
2e947c0b86 Merge pull request #300 from ngosang/feature/git
Install from TAR file and reduce image size
2022-10-28 09:44:15 +02:00
2234e9a63d Add ability to define database_table_prefix
For people in need to migrate to the docker version from a previous installed wallabag instance defined with a database prefix.
2022-10-28 09:36:15 +02:00
3214a229b6 Remove Bash and Make packages 2022-10-25 23:34:07 +02:00
66231efd36 Install from TAR file and reduce image size
* Git package not required
* Reduced Docker image size in 129 MB (808 MB -> 679 MB)
* Docker build time reduced in +1 min (no git pull)
2022-10-25 23:12:35 +02:00
3f801bf1a5 Update PHP 8.0 2022-10-25 22:37:22 +02:00
5620cd4e7d Merge pull request #298 from wallabag/fix/update-actions
Update actions to latest version
2022-10-21 14:13:55 +02:00
140721c49c Update test actions to latest version 2022-10-21 14:10:21 +02:00
61899108bc Update publish action to latest version
It removed all warning during the build.
2022-10-21 14:09:20 +02:00
3d63b3b6fd Merge pull request #297 from wallabag/release/2.5.2
2.5.2
2022-10-21 14:00:18 +02:00
7ffaafb436 2.5.2 2022-10-21 13:55:32 +02:00
b1aeffca4e Merge pull request #292 from wallabag/release/2.5.1
2.5.1
2022-06-09 09:44:29 +02:00
b49d7faf71 Stay on 3.15 2022-06-09 09:36:59 +02:00
bce0488aed 2.5.1
Also update alpine to 3.16
2022-06-09 09:35:02 +02:00
1d42727517 Merge pull request #287 from wallabag/release/2.5.0
2.5.0
2022-05-21 21:36:55 +02:00
939b644424 Update alpine image to 3.15
Also use latest Composer 2.2
2022-05-21 21:27:30 +02:00
3f62284368 2.5.0 2022-05-21 21:11:57 +02:00
7a99f1ef73 Merge pull request #284 from pgrunm/master 2022-05-20 21:08:56 +02:00
537b502424 Update build.yml to build ARM docker images.
This commit allows Github actions to automatically create and publish Docker images for armv7 and arm64 architecture (e. g. Raspberry Pi).
2022-04-29 13:58:21 +02:00
bfd3fe3d55 Merge pull request #282 from wallabag/fix/composer-2.3 2022-04-04 07:15:20 +02:00
ed49d39db4 wallabag isn't compatible with Composer 2.3
Install the latest known 2.2 version instead.
2022-04-01 16:20:35 +02:00
983bfe094b Remove forced composer v1 2022-02-15 09:29:16 +01:00
37216dfd69 Publish Docker images 2022-02-14 19:52:08 +01:00
13862eca8f Merge pull request #280 from wallabag/2.4.3
2.4.3
2022-02-14 17:04:37 +01:00
55b4290605 2.4.3 2022-02-14 17:00:55 +01:00
7873719099 Merge pull request #254 from sethsimmons/patch-1
Add healthcheck and dependencies to docker-compose example
2021-07-02 17:30:24 +02:00
05d9d45a54 Add healthcheck and dependencies to docker-compose example
This PR adds in a health check that can used for reporting, monitoring, or autohealing, as well as a `depends_on` statement that ensures wallabag comes up only once the DB and Redis are up.

Update timeout/retries to be more sane
2021-07-02 11:14:24 -04:00
13818bd90e 2.4.2 2021-03-16 12:17:19 +01:00
1b5fe1a934 Add missing parameter server_name for 2.4.1 2021-01-05 15:09:39 +01:00
9d44149e4d 2.4.1 2021-01-05 15:00:15 +01:00
2b99017b25 Merge pull request #239 from wallabag/otp-issuer 2021-01-04 06:47:50 +01:00
a85e592e6e Merge pull request #240 from wallabag/update-readme 2021-01-04 06:47:18 +01:00
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
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
58c3977a3c Merge pull request #238 from hoh/patch-1 2020-12-29 06:15:45 +01:00
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
749587fb4f Merge pull request #228 from wallabag/fix/env-prod-cli-parameter
Fix `-e=prod` parameter
2020-12-10 20:11:20 +01:00
6839862b04 Fix -e=prod parameter 2020-12-10 17:31:31 +01:00
f4f8bac984 Merge pull request #225 from wallabag/release-2.4.0
2.4.0
2020-12-10 16:11:05 +01:00
a04e494755 Update to 2.4.0 2020-12-10 16:04:00 +01:00
bd6e2b174e 2.4.0 2020-12-10 15:05:43 +01:00
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
c5df063ccb update Alpine base image to 3.12, change packages 2020-11-28 20:35:26 +01:00
d619c63e43 Merge pull request #223 from wallabag/github-actions
Ditch Travis to use GitHub Actions
2020-11-27 17:22:01 +01:00
7e43f2acfa Update badge in README 2020-11-27 14:52:31 +01:00
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
0e7fa2bca7 Merge pull request #216 from wallabag/dependabot/add-v2-config-file
Create Dependabot config file
2020-10-16 13:21:03 +02:00
1f1dd12cc3 Create Dependabot config file 2020-10-16 10:45:04 +00:00
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
511a2595bc Merge pull request #195 from ywoly/master
Set "expose_php" to "Off" in php.ini
2020-04-15 13:38:26 +02:00
6962f33ed7 Set "expose_php" to "Off" in php.ini 2020-04-15 12:15:32 +02:00
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
d02c1a404a Add env variables for two-factor auth 2020-04-15 09:24:48 +02:00
b8ab40b6b4 Remove ipv6 to avoid fail when ipv6 is not defined 2020-04-13 20:00:11 +02:00
2cd061f08d Merge pull request #183 from ivzhh/master
Prepare for wallabag 2.4
2020-03-27 15:54:48 +01:00
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
a444f0db9d Merge pull request #173 from hoh/patch-1
Fix Nginx was not binding on IPv6
2019-12-05 18:15:01 -08:00
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
6c548be161 Update README.md
See https://github.com/wallabag/docker/issues/152#issuecomment-561118356
2019-12-03 16:44:19 -08:00
174fa565eb Merge pull request #169 from cstuder/patch-1
Readme: Fixes link to documentation
2019-10-31 14:30:31 +01:00
45989b38de Readme: Fixes link to documentation 2019-10-30 17:25:17 +01:00
af075af5d8 Merge pull request #160 from sviande/config_sentry
Sentry: fix template parameters
2019-06-19 10:20:49 +02:00
51a60408e1 Sentry: fix template parameters 2019-06-19 10:06:02 +02:00
bea6b2fcc6 Merge pull request #159 from sviande/config_sentry
Config: add sentry_dsn entry
2019-06-18 20:28:39 +02:00
e189338065 Config: add sentry_dsn entry 2019-06-18 20:11:08 +02:00
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
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
88bf8bb86d Merge pull request #106 from glego/add-secure-email
Add secure email
2019-06-05 11:39:08 +02:00
58a4d10cc5 Merge pull request #156 from WagnerChristoph/patch-1
fix typo in README.md
2019-05-27 09:28:32 +02:00
501c4a08c6 fix typo in README.md 2019-05-24 22:16:19 +02:00
710cc43af4 Merge pull request #155 from wallabag/release-2.3.8
2.3.8
2019-05-14 13:24:19 +02:00
b2afa8eff4 2.3.8 2019-05-14 12:15:56 +02:00
a01e124295 Merge pull request #150 from wallabag/release-2.3.7
2.3.7
2019-03-04 15:21:33 +01:00
4abeb0db73 2.3.7 2019-03-04 13:44:40 +01:00
ca1dd1d464 Merge pull request #147 from jeroenj/tzdata
Adds tzdata to installed packages
2019-02-27 16:17:27 +01:00
c58b7b4af2 Merge pull request #148 from Chostakovitch/master
Add locale environment variable to README
2019-02-27 16:17:10 +01:00
4dcaf994ab Add locale environment variable to README 2019-02-27 11:15:10 +01:00
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
dd280bd5cf Merge pull request #142 from wallabag/release-2.3.6
2.3.6
2019-01-11 22:39:19 +01:00
e292a1c0c2 2.3.6 2019-01-11 22:09:49 +01:00
7cce137040 Merge pull request #137 from bencer/master
Add php7-tidy
2019-01-04 07:14:21 +01:00
ad326dcfe3 Add php7-tidy 2018-12-15 16:31:59 +01:00
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
66c3967ef5 Merge pull request #134 from kmlucy/master
Add redis environmental variables
2018-12-15 08:30:49 +01:00
6d7fdd92c8 Merge pull request #136 from wallabag/release-2.3.5
2.3.5
2018-12-15 08:27:38 +01:00
f9f5b5c68c 2.3.5 2018-12-15 07:18:19 +01:00
386924f2cc Update README.md 2018-12-07 22:44:48 -05:00
3d3f11fb85 add redis environmental variables 2018-12-07 22:42:18 -05:00
25bf47149f Merge pull request #132 from wallabag/release-2.3.4
2.3.4
2018-11-24 22:48:53 +01:00
0cee0470de Add missing PHP extension 2018-11-24 22:38:53 +01:00
b626873351 2.3.4 2018-11-24 21:57:13 +01:00
e741136827 Merge pull request #127 from Strubbl/patch-1
Update docker-compose.mariadb.yml
2018-10-15 20:27:05 +00:00
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
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
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
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
926e8c7445 Merge pull request #116 from Alwaysin/patch-1
Update to 2.3.3
2018-09-17 05:50:26 +00:00
7d7b1a846f added SYMFONY__ENV__DATABASE_CHARSET envorinment variable to README. 2018-08-12 08:45:44 -04:00
8fd1421d36 Update to 2.3.3 2018-07-15 21:02:12 +02:00
f86d945624 Merge pull request #107 from greenrd/feature/db-driver-class
Support Postgres 10
2018-03-17 13:26:42 +01:00
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
47dc65b84e add mailer transport env variable 2018-02-24 15:59:18 +01:00
64fc68eb56 add secure email 2018-02-24 15:56:41 +01:00
213d23691c add secure email 2018-02-23 20:39:10 +01:00
eeead4ff44 Merge pull request #103 from TomFaulkner/master
101 - Typo on readme
2018-02-16 08:55:05 +01:00
16a1a1236a Merge pull request #1 from TomFaulkner/TomFaulkner-patch-1-typo-in-readme
Update README.md
2018-02-09 20:24:04 -06:00
2460f55662 Update README.md
Remove dash leading to an error.
2018-02-09 20:23:10 -06:00
0fe76aa896 Merge pull request #102 from wallabag/wllbg-232
wallabag 2.3.2
2018-01-22 14:04:07 +01:00
0f52136d3d wallabag 2.3.2 2018-01-22 13:39:11 +01:00
de684f5a44 Adding example of how to set the domain name 2018-01-08 15:44:33 -08:00
bf0316bac6 Merge pull request #95 from wallabag/nicosomb-patch-1
wallabag 2.3.1
2017-12-26 22:23:26 +01:00
ae7aefe8e4 Updated parameters for 2.3.1 2017-12-26 21:35:43 +01:00
ef910d313c wallabag 2.3.1 2017-12-26 21:12:13 +01:00
51e3b625c0 Merge pull request #87 from bananenmannfrau/master
makes email confirmation for user registration configurable
2017-12-15 14:49:21 +01:00
dcaa684897 Updated README 2017-12-15 14:32:20 +01:00
6edcd745c4 makes email confirmation for user registration configurable 2017-12-15 14:31:11 +01:00
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
6a7bbbb8d0 Merge pull request #89 from wallabag/wallabag-23
Updated image to wallabag 2.3.0
2017-12-13 22:43:17 +01:00
e5456115c1 Forced postgres 9.6 2017-12-13 22:32:43 +01:00
7b68684720 Updated image to wallabag 2.3.0 2017-12-12 22:28:19 +01:00
b67e80a9f8 allow to override database_charset and locale with env variables 2017-09-20 18:06:33 +02:00
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
5123e9de38 use https for getting composer 2017-07-20 21:32:25 +02:00
5682aefa74 changed docs for persistent storage of images. #71 2017-05-30 11:19:36 +02:00
bf82658342 Merge pull request #69 from wallabag/update-223
Update Dockerfile to 2.2.3
2017-05-18 11:46:16 +02:00
abb0647cbd Update Dockerfile to 2.2.3 2017-05-18 11:05:41 +02:00
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
d1c050662b added edge main repo to fix rabbitmq-c dep for php7-amqp 2017-03-22 11:24:05 +01:00
038a5ea6c7 apk add uses now the no-cache option 2017-03-22 11:13:30 +01:00
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
3e4cd35253 Merge pull request #56 from wallabag/wllbg-222
Update Dockerfile with latest release
2017-03-08 10:00:11 +01:00
8c15693e12 Update Dockerfile with latest release 2017-03-02 15:49:19 +01:00
f6e4816eb5 provisioner function in entrypoint 2017-02-06 10:20:38 +01:00
bff2dd3d8b using alpine 3.5 instead of edge 2017-02-06 10:20:38 +01:00
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
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
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
5203ab63b1 Rename importer to import 2017-01-23 09:45:42 +01:00
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
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
924d663c86 Merge pull request #46 from wallabag/dockerfile-216
Update Dockerfile for wallabag 2.1.6
2017-01-18 19:26:07 +01:00
ec8f599298 Update Dockerfile for wallabag 2.1.6 2017-01-18 10:44:17 +01:00
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
606b7d681c Merge pull request #44 from janLo/php7-zlib
Install php7-zlib
2017-01-18 09:35:50 +01:00
fdaaf37381 Install php7-zlib
Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
2017-01-17 15:40:58 +01:00
2b13ed0703 Add a POPULAtE_DATABASE env to use an existing wallabag DB 2017-01-16 22:44:43 +01:00
e41a237604 enabled zlib.output_compression in php.ini
thanks to @itnAAnti. #40
2017-01-04 13:41:31 +01:00
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
267618a519 Make entrypoint.sh executable in repository and remove related statement from Dockerfile. 2016-12-26 18:59:30 +01:00
0fe227a0cc Merge pull request #36 from jsshandle/master
Add .s6-svscan/finish.
2016-11-28 12:27:22 +01:00
d42d34cdac Add .s6-svscan/finish. 2016-11-26 20:35:51 +01:00
58cc845c75 Dockerfile for 2.1.5 2016-11-21 10:54:30 +01:00
c553787564 Merge pull request #31 from wallabag/docker-214
Dockerfile for 2.1.4
2016-11-20 08:37:45 +01:00
73187d7ce1 Dockerfile for 2.1.4 2016-11-18 11:33:36 +01:00
f7bd58c73a fixed location of php configuration to /etc/php7 2016-11-07 13:20:39 +01:00
ba8f6ec5d3 limit upload size to 100M 2016-11-07 13:20:39 +01:00
68db53e09c Merge pull request #28 from wallabag/release-213
Update Dockerfile for wallabag 2.1.3
2016-11-05 15:13:27 +01:00
530e59329a Update Dockerfile for wallabag 2.1.3 2016-11-04 15:40:24 +01:00
2ae7dee8af fixed typo in README 2016-11-02 11:57:04 +01:00
c2052c2681 env variable to disable user registration 2016-11-02 11:52:22 +01:00
310d55bdea Merge pull request #27 from xsteadfastx/master
set email settings through ansible template
2016-10-31 09:29:08 +01:00
76f5ecb61e set email settings through ansible template 2016-10-28 13:06:52 +02:00
92f5db7ba9 added test for default configuration 2016-10-24 09:53:42 +02:00
ee4a7e4a46 defaults for environment variable lookup for parameters.yml template
fixes #26
2016-10-21 14:48:32 +02:00
e0bc4e895d Merge pull request #25 from xsteadfastx/master
version 2.1.2 and some cleanups
2016-10-19 11:30:00 +02:00
ed6b4437b8 version 2.1.2 and some cleanups 2016-10-19 11:17:24 +02:00
af2fb30389 fixed docs to get redis working
thanks to @bobberb for pointing in the right direction.
2016-10-13 11:18:24 +02:00
af6c68a312 Merge pull request #21 from xsteadfastx/master
2.1.1 image
2016-10-12 15:26:12 +02:00
1f4d9af316 added db migration part to the docs 2016-10-11 16:18:52 +02:00
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
f66d2aeab0 Merge pull request #20 from tomsquest/patch-1
Fix typo `the a volume` -> `a volume`
2016-10-11 12:16:32 +02:00
0d2bf2999a Fix typo the a volume -> a volume 2016-10-11 12:08:50 +02:00
8bd298316a Merge pull request #18 from m0/m0-fixRunCommandInExample
fixes example run-commands in README
2016-09-17 07:53:59 +02:00
d9f9efcf13 fixes example run-commands in README 2016-09-17 01:04:01 +02:00
cccc5fb91e Merge pull request #17 from wallabag/wllbg-208
wallabag 2.0.8
2016-09-07 15:36:33 +02:00
79ae48bfac wallabag 2.0.8 2016-09-07 14:38:00 +02:00
d0691598b6 Merge pull request #16 from xsteadfastx/master
Login testing works now
2016-09-02 10:24:10 +02:00
28b4b03b21 readme: added badges 2016-09-01 12:04:11 +02:00
c65be008ec tests: some pep8 and real failing if csrf dont match 2016-09-01 09:33:17 +02:00
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
efbcf75701 test_login: add login with csrf token and check if it was successful 2016-08-31 23:13:32 +02:00
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
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
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
67030c1c36 remove an unnecessary white space 2016-08-25 10:23:31 +02:00
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
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
93651c95f5 Fix bad SQLite title
and update few others titles
2016-08-24 15:17:36 +02:00
97783ac312 fixed README 2016-08-24 12:33:22 +02:00
b165d3c14f Update Dockerfile for 2.0.7 release 2016-08-23 09:34:30 +02:00
23 changed files with 630 additions and 244 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"

57
.github/workflows/publish.yml vendored Normal file
View File

@ -0,0 +1,57 @@
name: Publish Docker image
on:
release:
types: [published]
jobs:
push_to_registries:
name: Push Docker image to multiple registries
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Documentation: https://github.com/docker/setup-qemu-action
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
# Documentation: https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: |
wallabag/wallabag
ghcr.io/${{ github.repository }}
- name: Build and push Docker images
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
# Support for different platforms, see here:
# https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#-set-the-target-platforms-for-the-build---platform
platforms: linux/amd64,linux/arm64,linux/arm/v7

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

@ -0,0 +1,51 @@
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@v3
with:
fetch-depth: 2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: "Build image"
run: docker-compose -f tests/docker-compose.${{ matrix.database }}.yml build
- name: "Install dependencies"
run: pip install pytest pytest-docker requests
- name: "Run tests"
run: py.test --database=${{ matrix.database }} tests/
- name: "Get docker logs"
if: ${{ always() }}
run: docker-compose -p "wallabag_${{ matrix.database }}" -f tests/docker-compose.${{ matrix.database }}.yml logs wallabag
- name: "Cleanup environment"
if: ${{ always() }}
run: docker-compose -p "wallabag_${{ matrix.database }}" -f tests/docker-compose.${{ matrix.database }}.yml down -v

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
.cache
__pycache__/*
*.pyc

View File

@ -1,70 +1,86 @@
FROM alpine:edge ARG COMPOSER_VERSION=2.5.8
MAINTAINER Marvin Steadfast <marvin@xsteadfastx.org>
ENV WALLABAG_VERSION=2.0.6 \ FROM composer:$COMPOSER_VERSION as composer
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 \
SYMFONY__ENV__MAILER_HOST=127.0.0.1 \
SYMFONY__ENV__MAILER_USER=~ \
SYMFONY__ENV__MAILER_PASSWORD=~ \
SYMFONY__ENV__FROM_EMAIL=wallabag@example.com
FROM golang:alpine as builder
RUN echo "@testing http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \ # envsubst from gettext can not replace env vars with default values
&& apk add --update \ # this package is not available for ARM32 and we have to build it from source code
ansible \ # flag -ldflags "-s -w" produces a smaller executable
RUN go install -ldflags "-s -w" -v github.com/a8m/envsubst/cmd/envsubst@v1.3.0
FROM alpine:3.18
COPY --from=builder /go/bin/envsubst /usr/bin/envsubst
ARG WALLABAG_VERSION=2.6.7
RUN set -ex \
&& apk add --no-cache \
curl \ curl \
git \ libwebp \
libwebp@testing \
mariadb-client \
nginx \ nginx \
pcre \ pcre \
php7 \ php81 \
php7-ctype@testing \ php81-bcmath \
php7-curl@testing \ php81-ctype \
php7-dom@testing \ php81-curl \
php7-fpm@testing \ php81-dom \
php7-gd@testing \ php81-fpm \
php7-gettext@testing \ php81-gd \
php7-iconv@testing \ php81-gettext \
php7-json@testing \ php81-iconv \
php7-mbstring@testing \ php81-json \
php7-openssl@testing \ php81-mbstring \
php7-pdo_mysql@testing \ php81-openssl \
php7-pdo_pgsql@testing \ php81-pecl-amqp \
php7-pdo_sqlite@testing \ php81-pdo_mysql \
php7-phar@testing \ php81-pdo_pgsql \
php7-session@testing \ php81-pdo_sqlite \
php7-xml@testing \ php81-phar \
php7@testing\ php81-session \
py-mysqldb \ php81-simplexml \
py-psycopg2 \ php81-tokenizer \
py-simplejson \ php81-xml \
php81-zlib \
php81-sockets \
php81-xmlreader \
php81-tidy \
php81-intl \
php81-sodium \
mariadb-client \
postgresql14-client \
rabbitmq-c \
s6 \ s6 \
&& rm -rf /var/cache/apk/* tar \
tzdata \
RUN ln -s /usr/bin/php7 /usr/bin/php \ && ln -sf /usr/bin/php81 /usr/bin/php \
&& ln -sf /usr/sbin/php-fpm81 /usr/sbin/php-fpm \
&& rm -rf /var/cache/apk/* \
&& ln -sf /dev/stdout /var/log/nginx/access.log \ && ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log && ln -sf /dev/stderr /var/log/nginx/error.log
RUN curl -s http://getcomposer.org/installer | php \ COPY --from=composer /usr/bin/composer /usr/local/bin/composer
&& mv composer.phar /usr/local/bin/composer
RUN git clone --branch $WALLABAG_VERSION --depth 1 https://github.com/wallabag/wallabag.git /var/www/wallabag
COPY root / COPY root /
RUN cd /var/www/wallabag \ RUN set -ex \
&& SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist && curl -L -o /tmp/wallabag.tar.gz https://github.com/wallabag/wallabag/archive/$WALLABAG_VERSION.tar.gz \
&& tar xvf /tmp/wallabag.tar.gz -C /tmp \
&& mkdir /var/www/wallabag \
&& mv /tmp/wallabag-*/* /var/www/wallabag/ \
&& rm -rf /tmp/wallabag* \
&& cd /var/www/wallabag \
&& mkdir data/assets \
&& envsubst < /etc/wallabag/parameters.template.yml > app/config/parameters.yml \
&& SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist --no-progress \
&& rm -rf /root/.composer/* /var/www/wallabag/var/cache/* /var/www/wallabag/var/logs/* /var/www/wallabag/var/sessions/* \
&& chown -R nobody:nobody /var/www/wallabag
RUN chown -R nobody:nobody /var/www/wallabag ENV PATH="${PATH}:/var/www/wallabag/bin"
RUN chmod +x /entrypoint.sh # Set console entry path
WORKDIR /var/www/wallabag
EXPOSE 80 EXPOSE 80
ENTRYPOINT ["/entrypoint.sh"] ENTRYPOINT ["/entrypoint.sh"]

126
README.md
View File

@ -1,5 +1,9 @@
# What is wallabag? # 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. [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. 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,56 +15,100 @@ Default login is `wallabag:wallabag`.
## Environment variables ## 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 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_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_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_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_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_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_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__DATABASE_TABLE_PREFIX=...` (defaults to "wallabag_". Specifies the prefix for each database table)
- `-e SYMFONY__ENV__SECRET=...` (defaults to "ovmpmAWXRCabNlMgzlzFXDYmCFfzGv") - `-e SYMFONY__ENV__SECRET=...` (defaults to "ovmpmAWXRCabNlMgzlzFXDYmCFfzGv")
- `-e SYMFONY__ENV__MAILER_HOST=...` defaults to "127.0.0.1", the SMTP host) - `-e SYMFONY__ENV__LOCALE=...` (default to en)
- `-e SYMFONY__ENV__MAILER_USER=...` (defaults to "~", the SMTP user) - `-e SYMFONY__ENV__MAILER_DSN=...` (defaults to "smtp://127.0.0.1")
- `-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__FROM_EMAIL=...`(defaults to "wallabag@example.com", the address wallabag uses for outgoing emails) - `-e SYMFONY__ENV__TWOFACTOR_SENDER=...` (defaults to "`no-reply@wallabag.org`", the address wallabag uses for two-factor emails)
## sqlite - `-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-instance.wallabag.org`", 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)
The easiest way to start wallabag is to use the sqlite backend. You can spin that up with ## SQLite
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-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 --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-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 "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 --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 ## docker-compose
It's a good way to use [docker-compose](https://docs.docker.com/compose/). Example: An example [docker-compose](https://docs.docker.com/compose/) file can be seen below:
``` ```
version: '2' version: '3'
services: services:
wallabag: wallabag:
image: wallabag/wallabag image: wallabag/wallabag
@ -72,19 +120,41 @@ services:
- SYMFONY__ENV__DATABASE_NAME=wallabag - SYMFONY__ENV__DATABASE_NAME=wallabag
- SYMFONY__ENV__DATABASE_USER=wallabag - SYMFONY__ENV__DATABASE_USER=wallabag
- SYMFONY__ENV__DATABASE_PASSWORD=wallapass - SYMFONY__ENV__DATABASE_PASSWORD=wallapass
- SYMFONY__ENV__MAILER_HOST=127.0.0.1 - SYMFONY__ENV__DATABASE_CHARSET=utf8mb4
- SYMFONY__ENV__MAILER_USER=~ - SYMFONY__ENV__DATABASE_TABLE_PREFIX="wallabag_"
- SYMFONY__ENV__MAILER_PASSWORD=~ - SYMFONY__ENV__MAILER_DSN=smtp://127.0.0.1
- SYMFONY__ENV__FROM_EMAIL=wallabag@example.com - SYMFONY__ENV__FROM_EMAIL=wallabag@example.com
- SYMFONY__ENV__DOMAIN_NAME=https://your-wallabag-instance.wallabag.org
- SYMFONY__ENV__SERVER_NAME="Your wallabag instance"
ports: ports:
- "80" - "80"
volumes:
- /opt/wallabag/images:/var/www/wallabag/web/assets/images
healthcheck:
test: ["CMD", "wget" ,"--no-verbose", "--tries=1", "--spider", "http://localhost"]
interval: 1m
timeout: 3s
depends_on:
- db
- redis
db: db:
image: mariadb image: mariadb
environment: environment:
- MYSQL_ROOT_PASSWORD=wallaroot - MYSQL_ROOT_PASSWORD=wallaroot
volumes: volumes:
- /opt/wallabag:/var/lib/mysql - /opt/wallabag/data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
interval: 20s
timeout: 3s
redis:
image: redis:alpine
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 20s
timeout: 3s
``` ```
Note that you must fill out the mail related variables according to your mail config. Note that you must fill out the mail related variables according to your mail config.
## nginx ## nginx
@ -109,3 +179,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.

4
conftest.py Normal file
View File

@ -0,0 +1,4 @@
import pytest
def pytest_addoption(parser):
parser.addoption("--database", action="store", default="default")

103
root/entrypoint.sh Normal file → Executable file
View File

@ -1,8 +1,107 @@
#!/bin/sh #!/bin/sh
# Exit when any command fails
set -e
if [ "$1" = "wallabag" ];then COMMAND_ARG1="$1"
ansible-playbook -i /etc/ansible/hosts /etc/ansible/entrypoint.yml -c local COMMAND_ARG2="$2"
cd /var/www/wallabag || exit
wait_for_database() {
timeout 60s /bin/sh -c "$(cat << EOF
until echo 'Waiting for database ...' \
&& nc -z ${SYMFONY__ENV__DATABASE_HOST} ${SYMFONY__ENV__DATABASE_PORT} < /dev/null > /dev/null 2>&1 ; \
do sleep 1 ; done
EOF
)"
}
install_wallabag() {
su -c "php bin/console wallabag:install --env=prod -n" -s /bin/sh nobody
}
provisioner() {
SYMFONY__ENV__DATABASE_DRIVER=${SYMFONY__ENV__DATABASE_DRIVER:-pdo_sqlite}
POPULATE_DATABASE=${POPULATE_DATABASE:-True}
# Replace environment variables
envsubst < /etc/wallabag/parameters.template.yml > app/config/parameters.yml
# Wait for external database
if [ "$SYMFONY__ENV__DATABASE_DRIVER" = "pdo_mysql" ] || [ "$SYMFONY__ENV__DATABASE_DRIVER" = "pdo_pgsql" ] ; then
wait_for_database
fi
# Configure SQLite database
SQLITE_FILE_SIZE=$(wc -c "/var/www/wallabag/data/db/wallabag.sqlite" | awk '{print $1}')
if [ "$SYMFONY__ENV__DATABASE_DRIVER" = "pdo_sqlite" ] && ([ ! -f "/var/www/wallabag/data/db/wallabag.sqlite" ] || [ "$SQLITE_FILE_SIZE" = 0 ]) ; then
echo "Configuring the SQLite database ..."
install_wallabag
fi
# Configure MySQL / MariaDB database
if [ "$SYMFONY__ENV__DATABASE_DRIVER" = "pdo_mysql" ] && [ "$POPULATE_DATABASE" = "True" ] && [ "$MYSQL_ROOT_PASSWORD" != "" ] ; then
DATABASE_EXISTS="$(mysql -h "${SYMFONY__ENV__DATABASE_HOST}" --port "${SYMFONY__ENV__DATABASE_PORT}" -uroot -p"${MYSQL_ROOT_PASSWORD}" \
-sse "SELECT EXISTS(SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = '$SYMFONY__ENV__DATABASE_NAME')")"
if [ "$DATABASE_EXISTS" != "1" ]; then
echo "Configuring the MySQL database ..."
mysql -h "${SYMFONY__ENV__DATABASE_HOST}" --port "${SYMFONY__ENV__DATABASE_PORT}" -uroot -p"${MYSQL_ROOT_PASSWORD}" \
-e "CREATE DATABASE IF NOT EXISTS ${SYMFONY__ENV__DATABASE_NAME} CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;"
USER_EXISTS="$(mysql -h "${SYMFONY__ENV__DATABASE_HOST}" --port "${SYMFONY__ENV__DATABASE_PORT}" -uroot -p"${MYSQL_ROOT_PASSWORD}" \
-sse "SELECT EXISTS(SELECT 1 FROM mysql.user WHERE user = '$SYMFONY__ENV__DATABASE_USER')")"
if [ "$USER_EXISTS" != "1" ]; then
mysql -h "${SYMFONY__ENV__DATABASE_HOST}" --port "${SYMFONY__ENV__DATABASE_PORT}" -uroot -p"${MYSQL_ROOT_PASSWORD}" \
-e "CREATE USER IF NOT EXISTS '${SYMFONY__ENV__DATABASE_USER}'@'%' IDENTIFIED BY '${SYMFONY__ENV__DATABASE_PASSWORD}';"
mysql -h "${SYMFONY__ENV__DATABASE_HOST}" --port "${SYMFONY__ENV__DATABASE_PORT}" -uroot -p"${MYSQL_ROOT_PASSWORD}" \
-e "GRANT ALL PRIVILEGES ON ${SYMFONY__ENV__DATABASE_NAME}.* TO '${SYMFONY__ENV__DATABASE_USER}'@'%';"
fi
install_wallabag
else
echo "WARN: MySQL database is already configured. Remove the environment variable with root password."
fi
fi
# Configure Postgres database
if [ "$SYMFONY__ENV__DATABASE_DRIVER" = "pdo_pgsql" ] && [ "$POPULATE_DATABASE" = "True" ] && [ "$POSTGRES_PASSWORD" != "" ] ; then
export PGPASSWORD="${POSTGRES_PASSWORD}"
DATABASE_EXISTS="$(psql -qAt -h "${SYMFONY__ENV__DATABASE_HOST}" -p "${SYMFONY__ENV__DATABASE_PORT}" -U "${POSTGRES_USER}" \
-c "SELECT 1 FROM pg_catalog.pg_database WHERE datname = '${SYMFONY__ENV__DATABASE_NAME}';")"
if [ "$DATABASE_EXISTS" != "1" ]; then
echo "Configuring the Postgres database ..."
psql -q -h "${SYMFONY__ENV__DATABASE_HOST}" -p "${SYMFONY__ENV__DATABASE_PORT}" -U "${POSTGRES_USER}" \
-c "CREATE DATABASE ${SYMFONY__ENV__DATABASE_NAME};"
USER_EXISTS="$(psql -qAt -h "${SYMFONY__ENV__DATABASE_HOST}" -p "${SYMFONY__ENV__DATABASE_PORT}" -U "${POSTGRES_USER}" \
-c "SELECT 1 FROM pg_roles WHERE rolname = '${SYMFONY__ENV__DATABASE_USER}';")"
if [ "$USER_EXISTS" != "1" ]; then
psql -q -h "${SYMFONY__ENV__DATABASE_HOST}" -p "${SYMFONY__ENV__DATABASE_PORT}" -U "${POSTGRES_USER}" \
-c "CREATE ROLE ${SYMFONY__ENV__DATABASE_USER} with PASSWORD '${SYMFONY__ENV__DATABASE_PASSWORD}' LOGIN;"
fi
install_wallabag
else
echo "WARN: Postgres database is already configured. Remove the environment variable with root password."
fi
fi
# Remove cache and install Wallabag
rm -f -r /var/www/wallabag/var/cache
su -c "SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist" -s /bin/sh nobody
}
if [ "$COMMAND_ARG1" = "wallabag" ]; then
echo "Starting wallabag ..."
provisioner
echo "wallabag is ready!"
exec s6-svscan /etc/s6/ exec s6-svscan /etc/s6/
fi fi
if [ "$COMMAND_ARG1" = "import" ]; then
provisioner
exec su -c "bin/console wallabag:import:redis-worker --env=prod $COMMAND_ARG2 -vv" -s /bin/sh nobody
fi
if [ "$COMMAND_ARG1" = "migrate" ]; then
provisioner
exec su -c "bin/console doctrine:migrations:migrate --env=prod --no-interaction" -s /bin/sh nobody
fi
exec "$@" 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

@ -10,7 +10,7 @@ fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root; fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol; fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REQUEST_SCHEME $scheme; fastcgi_param REQUEST_SCHEME $scheme;
fastcgi_param HTTPS $https if_not_empty; fastcgi_param HTTPS $fe_https;
fastcgi_param GATEWAY_INTERFACE CGI/1.1; fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;

View File

@ -23,14 +23,19 @@ http {
gzip on; gzip on;
gzip_disable "msie6"; gzip_disable "msie6";
open_file_cache max=100; open_file_cache max=100;
client_max_body_size 50M; client_max_body_size 100M;
map $http_x_forwarded_proto $fe_https {
default $https;
https on;
}
upstream php-upstream { upstream php-upstream {
server 127.0.0.1:9000; server 127.0.0.1:9000;
} }
server { server {
listen 80;
server_name _; server_name _;
root /var/www/wallabag/web; root /var/www/wallabag/web;

View File

@ -268,7 +268,7 @@ output_buffering = 4096
; Note: You need to use zlib.output_handler instead of the standard ; Note: You need to use zlib.output_handler instead of the standard
; output_handler, or otherwise the output will be corrupted. ; output_handler, or otherwise the output will be corrupted.
; http://php.net/zlib.output-compression ; http://php.net/zlib.output-compression
zlib.output_compression = Off zlib.output_compression = On
; http://php.net/zlib.output-compression-level ; http://php.net/zlib.output-compression-level
;zlib.output_compression_level = -1 ;zlib.output_compression_level = -1
@ -373,7 +373,7 @@ zend.enable_gc = On
; threat in any way, but it makes it possible to determine whether you use PHP ; threat in any way, but it makes it possible to determine whether you use PHP
; on your server or not. ; on your server or not.
; http://php.net/expose-php ; http://php.net/expose-php
expose_php = On expose_php = Off
;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;
; Resource Limits ; ; Resource Limits ;
@ -670,7 +670,7 @@ auto_globals_jit = On
; Its value may be 0 to disable the limit. It is ignored if POST data reading ; Its value may be 0 to disable the limit. It is ignored if POST data reading
; is disabled through enable_post_data_reading. ; is disabled through enable_post_data_reading.
; http://php.net/post-max-size ; http://php.net/post-max-size
post_max_size = 20G post_max_size = 100M
; Automatically add files before PHP document. ; Automatically add files before PHP document.
; http://php.net/auto-prepend-file ; http://php.net/auto-prepend-file
@ -802,7 +802,7 @@ upload_tmp_dir = /tmp/
; Maximum allowed size for uploaded files. ; Maximum allowed size for uploaded files.
; http://php.net/upload-max-filesize ; http://php.net/upload-max-filesize
upload_max_filesize = 20G upload_max_filesize = 100M
; Maximum number of files that can be uploaded via a single request ; Maximum number of files that can be uploaded via a single request
max_file_uploads = 20 max_file_uploads = 20

2
root/etc/s6/.s6-svscan/finish Executable file
View File

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

View File

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

View File

@ -0,0 +1,56 @@
parameters:
database_driver: ${SYMFONY__ENV__DATABASE_DRIVER:-pdo_sqlite}
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.project_dir%/data/db/wallabag.sqlite"
database_table_prefix: ${SYMFONY__ENV__DATABASE_TABLE_PREFIX:-wallabag_}
database_socket: null
database_charset: ${SYMFONY__ENV__DATABASE_CHARSET:-utf8}
domain_name: ${SYMFONY__ENV__DOMAIN_NAME:-https://your-wallabag-instance.wallabag.org}
mailer_dsn: ${SYMFONY__ENV__MAILER_DSN:-smtp://127.0.0.1}
locale: ${SYMFONY__ENV__LOCALE:-en}
# A secret key that's used to generate certain security-related tokens
secret: ${SYMFONY__ENV__SECRET:-ovmpmAWXRCabNlMgzlzFXDYmCFfzGv}
# two factor stuff
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}
# how long the access token should live in seconds for the API
fos_oauth_server_access_token_lifetime: 3600
# how long the refresh token should life in seconds for the API
fos_oauth_server_refresh_token_lifetime: 1209600
from_email: ${SYMFONY__ENV__FROM_EMAIL:-no-reply@wallabag.org}
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:-~}
# User-friendly name of your instance for 2FA issuer
server_name: ${SYMFONY__ENV__SERVER_NAME:-"Your wallabag instance"}

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: %env.mailer_host%
mailer_user: %env.mailer_user%
mailer_password: %env.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: %env.from_email%
# fosuser stuff
fosuser_confirmation: true
from_email: %env.from_email%

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: mariadbd --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"

87
tests/test_login.py Normal file
View File

@ -0,0 +1,87 @@
import pytest
import re
import requests
import os
from requests.exceptions import ConnectionError
@pytest.fixture(scope="session")
def database(pytestconfig):
return pytestconfig.getoption("database")
def is_responsive(url):
try:
response = requests.get(url)
if response.status_code == 200:
return True
except ConnectionError:
return False
@pytest.fixture(scope="session")
def docker_compose_project_name(database):
return "wallabag_{}".format(database)
@pytest.fixture(scope="session")
def docker_cleanup():
"""Disable docker cleanup at the end of tests to get logs outside of pytest"""
return False
@pytest.fixture(scope="session")
def docker_compose_command() -> str:
return "docker-compose"
@pytest.fixture(scope="session")
def docker_compose_file(pytestconfig, database):
return os.path.join(str(pytestconfig.rootdir), "tests/", "docker-compose.{}.yml".format(database))
@pytest.fixture(scope="session")
def wallabag_service(docker_ip, docker_services):
"""Ensure that wallabag service is up and responsive"""
# `port_for` takes a container port and returns the corresponding host port
port = docker_services.port_for("wallabag", 80)
url = "http://{}:{}".format(docker_ip, port)
docker_services.wait_until_responsive(
timeout=60.0, pause=0.5, check=lambda: is_responsive(url)
)
return url
def test_accessing_login_page(wallabag_service):
r = requests.get(wallabag_service, 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(wallabag_service):
client = requests.session()
r = client.get(wallabag_service, 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(wallabag_service + '/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