1
0
mirror of https://github.com/wallabag/docker synced 2025-12-13 17:56:31 +00:00

205 Commits

Author SHA1 Message Date
Jérémy Benoist
1e28e25500 Merge pull request #467 from paper42/upgrades-2025 2025-11-27 06:52:35 +01:00
Emi Vasilková
bfb9e7dc40 dependency upgrades
* use LTS version of composer
* use a maintained version of alpine
* upgrade php to 8.4 (because 8.1 was dropped from alpine and it's
  almost EOL)
2025-11-27 00:33:12 +01:00
Jérémy Benoist
b133e9559d Merge pull request #466 from wallabag/dependabot/github_actions/actions/checkout-6 2025-11-24 06:52:21 +01:00
dependabot[bot]
b0b760a765 Bump actions/checkout from 5 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-24 03:28:14 +00:00
Jérémy Benoist
480d3833bc Merge pull request #464 from wallabag/release/2.6.14
Prepare 2.6.14
2025-10-07 10:16:19 +02:00
Jérémy Benoist
42981284a6 Prepare 2.6.14 2025-10-07 09:50:42 +02:00
Jérémy Benoist
91a399d3bb Merge pull request #461 from wallabag/dependabot/github_actions/actions/setup-python-6 2025-09-08 07:04:05 +02:00
dependabot[bot]
ccb4b25562 Bump actions/setup-python from 5 to 6
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-08 02:16:41 +00:00
Jérémy Benoist
c8b95ac15b Merge pull request #459 from kentahikaru/wallabag-and-rabbitmq-in-docker
rabbitmq support in docker
2025-08-25 08:25:05 +02:00
kentahikaru
25a2e3de71 modified parameters template so it supports rabbitmq configuration from environment variables 2025-08-23 15:54:51 +02:00
Kevin Decherf
b522c24645 Merge pull request #458 from wallabag/dependabot/github_actions/actions/checkout-5
Bump actions/checkout from 4 to 5
2025-08-18 10:00:04 +02:00
dependabot[bot]
2ed6cbca1c Bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-18 04:35:45 +00:00
Kevin Decherf
9dd6c5b52b Merge pull request #452 from wallabag/impr/updates
Update Alpine base image, envsubst and composer
2025-07-18 13:00:47 +02:00
Kevin Decherf
0e11114336 Update composer to 2.8.10
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2025-07-18 01:04:02 +02:00
Kevin Decherf
6379d9b90f Update base image to Alpine 3.19
Security support on Alpine 3.18 ended on 09 May 2025.
Moving to 3.19 gives us new updates until Nov 2025 while keeping PHP 8.1

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2025-07-18 01:01:12 +02:00
Kevin Decherf
e1fafcc31f Update envsubst to v1.4.3
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2025-07-17 17:21:44 +02:00
Jérémy Benoist
7d2f4919c6 Merge pull request #426 from boraozgen/readme-update
Update example compose file mariadb healthcheck command
2025-06-05 09:01:48 +02:00
Nicolas Lœuillet
096ea7f79c Merge pull request #443 from wallabag/release-2613
Prepare 2.6.13 release
2025-06-04 17:48:01 +02:00
Nicolas Lœuillet
2c1ec84dc7 Prepare 2.6.13 release 2025-06-04 17:37:11 +02:00
Kevin Decherf
488814d187 Merge pull request #440 from wallabag/impr/nginx-dualstack
Support dualstack listen on nginx
2025-04-29 22:56:19 +02:00
Kevin Decherf
3808b524fc Support dualstack listen on nginx
Fixes #422
Supersedes #435

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2025-04-20 17:22:46 +02:00
Kevin Decherf
dd237ec16e Merge pull request #430 from caspermeijn/healthcheck
Add healthcheck to image
2025-04-20 12:58:45 +02:00
Jérémy Benoist
84756ac1fd Merge pull request #439 from deviantintegral/add-opcache
Install the opcache extension #162
2025-04-17 09:10:15 +02:00
Andrew Berry
60ce6d2e4f Install the opcache extension #162 2025-04-16 21:01:34 -04:00
Yassine Guedidi
b228deb919 Merge pull request #437 from wallabag/prepare-2.6.12-release
Prepare 2.6.12 release
2025-04-10 13:55:21 +02:00
Yassine Guedidi
52afa94c77 Prepare 2.6.12 release 2025-04-10 12:08:12 +02:00
Yassine Guedidi
55976e23e5 Merge pull request #436 from wallabag/prepare-2.6.11-release
Prepare 2.6.11 release
2025-04-08 23:09:59 +02:00
Yassine Guedidi
3975a28546 Prepare 2.6.11 release 2025-03-30 06:38:09 +02:00
Kevin Decherf
0e58189b97 Merge pull request #431 from Luensche/patch-1
Update README.md
2025-01-23 20:11:14 +01:00
Björn Engel
2d96e30450 Update README.md
Version in docker-compose.yaml is obsolete.
2025-01-07 21:40:29 +01:00
Casper Meijn
424642d3b9 Add healthcheck to image
- Move the healthcheck from the docker-compose example to the actual image. That makes sure all user of the image automatically get the healthcheck.
- Change to `curl --fail || exit 1` as suggested in [docker documentation](https://docs.docker.com/reference/dockerfile/#healthcheck)
- Add `--silent --show-error` so that docker health state contains the output of the HTTP call instead of curl progress bar
- Set the user agent to make the logs more readable
2024-12-24 16:56:22 +01:00
Kevin Decherf
364b1b3d84 Merge pull request #428 from wallabag/2.6.x
Backport 2.6.10 into master
2024-11-19 21:10:09 +01:00
Bora Özgen
923dffae55 Update example compose file mariadb healthcheck command 2024-11-12 09:22:30 +01:00
Jérémy Benoist
d1c4800a3e Merge pull request #427 from wallabag/fix/update-ci
Update CI
2024-11-12 09:22:12 +01:00
Jeremy Benoist
4c3ff8a8ac Update CI
Allow dependabot to keep GA up to date.
2024-11-12 09:03:21 +01:00
Nicolas Lœuillet
c9104abfeb Merge pull request #424 from wallabag/release/2.6.10
Prepare 2.6.10 release
2024-11-03 16:00:52 +01:00
Nicolas Lœuillet
78d6d36e0c Prepare 2.6.10 release 2024-11-03 08:12:24 +01:00
Jérémy Benoist
2a78ed65fe Merge pull request #411 from wallabag/release/2.6.9
Prepare 2.6.9
2024-04-03 11:14:05 +02:00
Jérémy Benoist
cb78d1c98c Prepare 2.6.9
See https://github.com/wallabag/wallabag/releases/tag/2.6.9
2024-04-03 11:00:19 +02:00
Kevin Decherf
19b6080f31 Merge pull request #404 from wallabag/impr/phpini
Update shipped php.ini with php-production.ini from PHP 8.1
2024-03-11 12:51:25 +01:00
Kevin Decherf
85c82d22c4 Update shipped php.ini with php-production.ini from PHP 8.1
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2024-03-11 12:46:49 +01:00
Kevin Decherf
2ab5b95caf Merge pull request #405 from wallabag/impr/nginx
Update NGINX timeout to align with max_execution_time
2024-03-11 12:03:26 +01:00
Kevin Decherf
2c4fc77b58 Update NGINX timeout to align with max_execution_time
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2024-03-11 11:55:59 +01:00
Kevin Decherf
bffc1412bf Merge pull request #403 from wallabag/impr/memlimit
Add support of PHP memory limit in variables
2024-03-11 11:54:52 +01:00
Kevin Decherf
588c21b192 Add support of PHP memory limit in variables
Supersedes #374

Fixes #124

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2024-03-11 11:52:55 +01:00
Kevin Decherf
6f2ec8654e Merge branch 'master' into 2.6.x 2024-03-10 22:03:33 +01:00
Kevin Decherf
4143013553 Merge pull request #402 from wallabag/fix/sqlite
Fix SQLite provisioning
2024-03-10 21:59:54 +01:00
Kevin Decherf
eaf63d2098 Merge pull request #401 from wallabag/impr/doc
doc: change docker-compose healthcheck target
2024-03-10 21:59:31 +01:00
Kevin Decherf
9c6aca3b76 Fix SQLite provisioning
If we use a local folder volume binding, install_wallabag was failing
because of missing file and permission issues.

This reworks the way we initially create the database when it is missing
or empty.

Superseeds #386

Fixes #316 #346

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2024-03-10 16:21:31 +01:00
Kevin Decherf
e16d9e4113 doc: change docker-compose healthcheck target
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2024-03-10 16:20:26 +01:00
Kevin Decherf
03d1e3a920 Merge pull request #398 from neilbags/patch-1
Add restart: unless-stopped to example docker-compose
2024-03-10 14:11:08 +01:00
Neil McKenzie
7c9d8a37e0 Add restart: unless-stopped to example docker-compose
Most example docker-compose files include restart: unless-stopped or restart: always. This being absent on Wallabag's example leads to unexpected downtime upon server restart
2024-02-01 08:53:52 +11:00
Jérémy Benoist
bdbf7b909a Merge pull request #393 from wallabag/release/2.6.8
Prepare 2.6.8
2024-01-03 09:33:14 +01:00
Jérémy Benoist
bf62096c0e Prepare 2.6.8 2024-01-03 09:32:44 +01:00
Jérémy Benoist
f59fb4b67a Merge pull request #385 from markusnasholm/nginx_ipv6 2023-12-23 07:40:15 +01:00
Markus Näsholm
c68fc98e51 Update nginx.conf to work with IPv6 2023-10-05 20:20:45 +02:00
Jérémy Benoist
919f82516c Merge pull request #384 from wallabag/release/2.6.7
Prepare 2.6.7
2023-10-02 14:32:24 +02:00
Jérémy Benoist
2515407009 Prepare 2.6.7 2023-10-02 14:30:58 +02:00
Yassine Guedidi
96dd9bc3e3 Merge pull request #362 from yguedidi/build-assets
Use the release archive instead of the git archive
2023-09-27 22:34:42 +02:00
Yassine Guedidi
5bde344da3 Use the release archive instead of the git archive 2023-09-27 20:38:11 +02:00
Jérémy Benoist
36d4bf58db Merge pull request #378 from wallabag/impr/imagick
Use php81-pecl-imagick from default repository
2023-09-12 20:56:40 +02:00
Kevin Decherf
e7b0f9c7f6 Use php81-pecl-imagick from default repository
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2023-09-12 20:01:17 +02:00
Jérémy Benoist
5a426ce3fa Merge pull request #376 from itcbx/master 2023-09-11 07:14:38 +02:00
Chen BingXin
75d1b96cc8 Support for gif.
Add imagick extension to support gif.
2023-09-09 10:05:42 +08:00
Jérémy Benoist
9241c7d799 Merge pull request #375 from wallabag/release/2.6.6
Prepare 2.6.6
2023-09-07 09:29:54 +02:00
Jérémy Benoist
18d9f742fb Prepare 2.6.6 2023-09-07 09:29:14 +02:00
Jérémy Benoist
b5d9ba681c Merge pull request #372 from wallabag/release/2.6.5
2.6.5
2023-08-28 10:38:22 +02:00
Jérémy Benoist
b340aaee0a Merge pull request #371 from wallabag/revert-370-release-265
Revert "Update Dockerfile to release 2.6.5"
2023-08-28 10:38:07 +02:00
Jérémy Benoist
746c6e682b 2.6.5 2023-08-28 10:36:30 +02:00
Jérémy Benoist
d7e49fbda9 Revert "Update Dockerfile to release 2.6.5" 2023-08-28 10:35:58 +02:00
Nicolas Lœuillet
8a68a267ed Merge pull request #370 from wallabag/release-265
Update Dockerfile to release 2.6.5
2023-08-28 10:29:43 +02:00
Nicolas Lœuillet
4b00b7f383 Update Dockerfile to release 2.6.5 2023-08-28 10:27:16 +02:00
Nicolas Lœuillet
f1e3a0e2ae Merge pull request #357 from wallabag/change-default-fosuser-registration
Change public registration to false by default
2023-08-24 08:00:42 +02:00
Nicolas Lœuillet
c2b7c3bbd7 Fix test 2023-08-24 07:55:21 +02:00
Nicolas Lœuillet
7810ca6255 Change public registration to false by default 2023-08-24 07:55:21 +02:00
Nicolas Lœuillet
4f406f1f1f Merge pull request #365 from wallabag/nicosomb-patch-1
Update Dockerfile for 2.6.4
2023-08-22 15:50:15 +02:00
Nicolas Lœuillet
7edde03f39 Update Dockerfile for 2.6.4 2023-08-22 15:45:19 +02:00
Nicolas Lœuillet
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
Jérémy Benoist
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
Nicolas Lœuillet
854d1027b8 Update Dockerfile for wallabag 2.6.3 2023-08-21 12:07:33 +02:00
Yassine Guedidi
f4517471db Get composer from official image 2023-08-15 18:21:29 +02:00
Nicolas Lœuillet
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
Yassine Guedidi
624616cd9e Rename root_dir to project_dir 2023-08-13 11:48:06 +02:00
Jérémy Benoist
d6ce0cea67 Merge pull request #344 from STaRDoGG/patch-1
Change default workdir
2023-07-24 15:31:15 +02:00
J. Scott Elblein
673dea7800 Merge branch 'master' into patch-1 2023-07-24 07:56:12 -05:00
Kevin Decherf
d21d9c6260 Merge pull request #355 from wallabag/update-readme
Update README
2023-07-24 13:42:23 +02:00
Nicolas Lœuillet
886535f767 Update Dockerfile for wallabag 2.6.2 2023-07-24 13:15:37 +02:00
Nicolas Lœuillet
1ad213de86 Update README 2023-07-24 13:11:12 +02:00
Jérémy Benoist
3538a3c8d7 Merge pull request #345 from STaRDoGG/patch-2
Add wallabag/bin to PATH
2023-07-24 10:32:36 +02:00
Jérémy Benoist
92fcba3557 Merge pull request #354 from wallabag/alpine318
Update base alpine to 3.18
2023-07-24 10:31:52 +02:00
Kevin Decherf
98ed4730b3 drop: run tests on master
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2023-07-22 18:34:12 +02:00
Kevin Decherf
c0c280b606 Update base alpine to 3.18
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2023-07-22 18:32:38 +02:00
Kevin Decherf
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
Nicolas Lœuillet
e61cbdb025 Merge pull request #352 from wallabag/nicosomb-patch-1
Remove 2fa parameter
2023-07-22 17:55:29 +02:00
Kevin Decherf
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
Nicolas Lœuillet
835e9ad84b Remove 2fa parameter 2023-07-22 17:34:17 +02:00
Kevin Decherf
d5aac3e6ed Merge pull request #351 from wallabag/impr/pytest
tests: move docker service start in pytest
2023-07-22 17:33:32 +02:00
Kevin Decherf
e38f9adb8b tests: move docker service start in pytest
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2023-07-22 17:17:11 +02:00
J. Scott Elblein
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
J. Scott Elblein
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
Jérémy Benoist
62d1948e15 Merge pull request #336 from wallabag/nicosomb-patch-1
2.6.1
2023-06-21 13:45:25 +02:00
Jeremy Benoist
a025d243d1 Fix mariadb launch 2023-06-21 13:39:51 +02:00
Jeremy Benoist
fb13655def Handle mailer_dsn 2023-06-21 10:45:24 +02:00
Jeremy Benoist
de07417e8f Update domain name 2023-06-21 09:56:30 +02:00
Jérémy Benoist
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
Nicolas Lœuillet
8bc63c22ec Update Dockerfile 2023-06-21 07:27:14 +02:00
Nicolas Lœuillet
676572b8fe Update dependencies 2023-06-20 18:16:17 +02:00
Nicolas Lœuillet
d51cc9fe33 Update Dockerfile to 2.6.0 2023-06-20 18:07:13 +02:00
Jérémy Benoist
5c52eee713 Merge pull request #319 from wallabag/release/2.5.4
2.5.4
2023-02-07 22:28:01 +01:00
Jérémy Benoist
e2717ea9a9 2.5.4
See https://github.com/wallabag/wallabag/releases/tag/2.5.4
2023-02-07 22:25:16 +01:00
Jérémy Benoist
185b063ca2 Merge pull request #315 from wallabag/release/2.5.3
2.5.3
2023-02-01 10:22:30 +01:00
Jérémy Benoist
a298ff95f7 2.5.3 2023-02-01 10:19:37 +01:00
Jérémy Benoist
68c2e88e88 Merge pull request #313 from ngosang/feature/config 2023-01-02 06:49:45 +01:00
ngosang
2b75993504 Fix PHP 8.1 configuration 2022-12-30 20:27:52 +01:00
Jérémy Benoist
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
ngosang
b10121989c Update Alpine 3.17 and PHP 8.1 2022-11-30 00:24:03 +01:00
Kevin Decherf
74bfdfa5c7 Merge pull request #307 from ngosang/feature/ansible
Replace Ansible with Shell script
2022-11-13 15:17:33 +01:00
ngosang
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
Jérémy Benoist
30c372025e Merge pull request #308 from ngosang/feature/actions
Update Python version in GitHub Actions
2022-11-02 09:56:41 +01:00
Jérémy Benoist
4c4aa852c1 Merge pull request #309 from ngosang/feature/composer
Update Composer 2.2.18
2022-11-02 09:56:11 +01:00
ngosang
2603775b01 Update Composer 2.2.18 2022-10-29 13:39:37 +02:00
ngosang
3f4a4c7625 Update Python version in GitHub Actions 2022-10-29 02:51:41 +02:00
Jérémy Benoist
ae9214ea87 Merge pull request #306 from ngosang/feature/iconv 2022-10-28 19:05:17 +02:00
ngosang
f92efc56d6 Remove fix for gnu-libiconv (already fixed in Alpine 3.16) 2022-10-28 16:18:26 +02:00
Jérémy Benoist
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
hwiorn
bf0102ece6 Fix default value of fe_https for non-reverse-proxy compatibility 2022-10-28 14:01:09 +02:00
hwiorn
054677bb02 Fix nginx.conf for reverse-proxy with HTTPS 2022-10-28 14:01:09 +02:00
Jérémy Benoist
43a26d7406 Merge pull request #302 from ngosang/feature/alpine
Update Alpine 3.16
2022-10-28 14:00:04 +02:00
Jérémy Benoist
ecb1ed2793 Merge pull request #301 from ngosang/feature/bash
Remove Bash and Make packages
2022-10-28 13:59:02 +02:00
ngosang
104373da6d Update Alpine 3.16 2022-10-28 12:51:17 +02:00
Diego Heras
080b97130b Merge branch 'master' into feature/bash 2022-10-28 12:44:35 +02:00
Jérémy Benoist
115c83794a Merge pull request #299 from ngosang/feature/php8
Update PHP 8.0
2022-10-28 09:45:12 +02:00
Jérémy Benoist
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
Jérémy Benoist
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
Jeremy Benoist
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
ngosang
3214a229b6 Remove Bash and Make packages 2022-10-25 23:34:07 +02:00
ngosang
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
ngosang
3f801bf1a5 Update PHP 8.0 2022-10-25 22:37:22 +02:00
Jérémy Benoist
5620cd4e7d Merge pull request #298 from wallabag/fix/update-actions
Update actions to latest version
2022-10-21 14:13:55 +02:00
Jérémy Benoist
140721c49c Update test actions to latest version 2022-10-21 14:10:21 +02:00
Jérémy Benoist
61899108bc Update publish action to latest version
It removed all warning during the build.
2022-10-21 14:09:20 +02:00
Jérémy Benoist
3d63b3b6fd Merge pull request #297 from wallabag/release/2.5.2
2.5.2
2022-10-21 14:00:18 +02:00
Jérémy Benoist
7ffaafb436 2.5.2 2022-10-21 13:55:32 +02:00
Jérémy Benoist
b1aeffca4e Merge pull request #292 from wallabag/release/2.5.1
2.5.1
2022-06-09 09:44:29 +02:00
Jérémy Benoist
b49d7faf71 Stay on 3.15 2022-06-09 09:36:59 +02:00
Jérémy Benoist
bce0488aed 2.5.1
Also update alpine to 3.16
2022-06-09 09:35:02 +02:00
Jérémy Benoist
1d42727517 Merge pull request #287 from wallabag/release/2.5.0
2.5.0
2022-05-21 21:36:55 +02:00
Jeremy Benoist
939b644424 Update alpine image to 3.15
Also use latest Composer 2.2
2022-05-21 21:27:30 +02:00
Jérémy Benoist
3f62284368 2.5.0 2022-05-21 21:11:57 +02:00
Jérémy Benoist
7a99f1ef73 Merge pull request #284 from pgrunm/master 2022-05-20 21:08:56 +02:00
Pascal Gru
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
Jérémy Benoist
bfd3fe3d55 Merge pull request #282 from wallabag/fix/composer-2.3 2022-04-04 07:15:20 +02:00
Jérémy Benoist
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
Jeremy Benoist
983bfe094b Remove forced composer v1 2022-02-15 09:29:16 +01:00
Jeremy Benoist
37216dfd69 Publish Docker images 2022-02-14 19:52:08 +01:00
Jérémy Benoist
13862eca8f Merge pull request #280 from wallabag/2.4.3
2.4.3
2022-02-14 17:04:37 +01:00
Jérémy Benoist
55b4290605 2.4.3 2022-02-14 17:00:55 +01:00
Kevin Decherf
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
Seth Simmons
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
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
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
23 changed files with 1148 additions and 1049 deletions

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

@@ -0,0 +1,21 @@
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"
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
time: "04:00"
timezone: Europe/Paris
open-pull-requests-limit: 10

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@v6
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Log in to the Container registry
uses: docker/login-action@v3
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@v3
# Documentation: https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: |
wallabag/wallabag
ghcr.io/${{ github.repository }}
- name: Build and push Docker images
uses: docker/build-push-action@v6
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@v6
with:
fetch-depth: 2
- name: Set up Python
uses: actions/setup-python@v6
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

View File

@@ -1,26 +0,0 @@
language: python
python:
- 3.5
services:
- docker
env:
- DB_TYPE=default
- DB_TYPE=sqlite
- DB_TYPE=mariadb
- DB_TYPE=postgresql
install:
- docker-compose -f tests/docker-compose.$DB_TYPE.yml build
- docker-compose -f tests/docker-compose.$DB_TYPE.yml up -d
before_script:
- pip install pytest
- pip install requests
script:
- docker ps | grep -q wallabag
- sleep 60
- py.test tests/

View File

@@ -1,66 +1,91 @@
FROM alpine:latest
ARG COMPOSER_VERSION=2.2
LABEL maintainer "Marvin Steadfast <marvin@xsteadfastx.org>"
FROM composer:$COMPOSER_VERSION AS composer
ARG WALLABAG_VERSION=2.3.8
FROM golang:alpine AS builder
# envsubst from gettext can not replace env vars with default values
# this package is not available for ARM32 and we have to build it from source code
# flag -ldflags "-s -w" produces a smaller executable
RUN go install -ldflags "-s -w" -v github.com/a8m/envsubst/cmd/envsubst@v1.4.3
FROM alpine:3.22
COPY --from=builder /go/bin/envsubst /usr/bin/envsubst
ARG WALLABAG_VERSION=2.6.14
RUN set -ex \
&& apk update \
&& apk upgrade --available \
&& apk add \
ansible \
&& apk add --no-cache \
curl \
git \
libwebp \
mariadb-client \
nginx \
pcre \
php7 \
php7-amqp \
php7-bcmath \
php7-ctype \
php7-curl \
php7-dom \
php7-fpm \
php7-gd \
php7-gettext \
php7-iconv \
php7-json \
php7-mbstring \
php7-openssl \
php7-pdo_mysql \
php7-pdo_pgsql \
php7-pdo_sqlite \
php7-phar \
php7-session \
php7-simplexml \
php7-tokenizer \
php7-xml \
php7-zlib \
php7-sockets \
php7-xmlreader \
php7-tidy \
py-mysqldb \
py-psycopg2 \
py-simplejson \
php84 \
php84-bcmath \
php84-ctype \
php84-curl \
php84-dom \
php84-fpm \
php84-gd \
php84-gettext \
php84-iconv \
php84-json \
php84-mbstring \
php84-opcache \
php84-openssl \
php84-pecl-amqp \
php84-pecl-imagick \
php84-pdo_mysql \
php84-pdo_pgsql \
php84-pdo_sqlite \
php84-phar \
php84-session \
php84-simplexml \
php84-tokenizer \
php84-xml \
php84-zlib \
php84-sockets \
php84-xmlreader \
php84-tidy \
php84-intl \
php84-sodium \
mariadb-client \
postgresql17-client \
rabbitmq-c \
s6 \
tar \
tzdata \
&& ln -sf /usr/bin/php84 /usr/bin/php \
&& ln -sf /usr/sbin/php-fpm84 /usr/sbin/php-fpm \
&& rm -rf /var/cache/apk/* \
&& ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log \
&& curl -s https://getcomposer.org/installer | php \
&& mv composer.phar /usr/local/bin/composer \
&& git clone --branch $WALLABAG_VERSION --depth 1 https://github.com/wallabag/wallabag.git /var/www/wallabag
&& ln -sf /dev/stderr /var/log/nginx/error.log
COPY --from=composer /usr/bin/composer /usr/local/bin/composer
COPY root /
RUN set -ex \
&& curl -L -o /tmp/wallabag.tar.gz https://github.com/wallabag/wallabag/releases/download/$WALLABAG_VERSION/wallabag-$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
ENV PATH="${PATH}:/var/www/wallabag/bin"
# Set console entry path
WORKDIR /var/www/wallabag
HEALTHCHECK CMD curl --fail --silent --show-error --user-agent healthcheck http://localhost/api/info || exit 1
EXPOSE 80
ENTRYPOINT ["/entrypoint.sh"]
CMD ["wallabag"]

View File

@@ -1,6 +1,6 @@
# What is wallabag?
[![Build Status](https://travis-ci.org/wallabag/docker.svg?branch=master)](https://travis-ci.org/wallabag/docker)
![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/)
@@ -15,44 +15,46 @@ 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_DRIVER_CLASS=...` (sets the database driver class 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__DATABASE_TABLE_PREFIX=...` (defaults to "wallabag_". Specifies the prefix for each database table)
- `-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__FOSUSER_REGISTRATION=...`(defaults to "true", enable or disable public user registration)
- `-e SYMFONY__ENV__MAILER_DSN=...` (defaults to "smtp://127.0.0.1")
- `-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)
- `-e SYMFONY__ENV__FOSUSER_REGISTRATION=...`(defaults to "false", 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__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)
- `-e PHP_MEMORY_LIMIT=...` (allows you to change the PHP `memory_limit` value. defaults to 128M, and should be a number and unit, eg. 512K, 128M, 2G, or a number of bytes)
## SQLite
The easiest way to start wallabag is to use the SQLite backend. You can spin that up with
```
$ docker run -p 80:80 wallabag/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 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/data:/var/www/wallabag/data -v /opt/wallabag/images:/var/www/wallabag/web/assets/images -p 80:80 wallabag/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
@@ -61,7 +63,7 @@ For using MariaDB or MySQL you have to define some environment variables with th
```
$ 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" -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
@@ -70,7 +72,7 @@ For using PostgreSQL you have to define some environment variables with the cont
```
$ 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_DRIVER_CLASS=Wallabag\CoreBundle\Doctrine\DBAL\Driver\CustomPostgreSQLDriver' -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
@@ -79,13 +81,13 @@ To use redis with a Docker link, a redis container with the name `redis` is need
```
$ docker run -p 6379:6379 --name redis redis:alpine
$ docker run -p 80:80 --link redis:redis wallabag/wallabag
$ 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" wallabag/wallabag
$ 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
@@ -104,13 +106,13 @@ $ docker exec -t NAME_OR_ID_OF_YOUR_WALLABAG_CONTAINER /var/www/wallabag/bin/con
## 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: '3'
services:
wallabag:
image: wallabag/wallabag
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=wallaroot
- SYMFONY__ENV__DATABASE_DRIVER=pdo_mysql
@@ -120,23 +122,36 @@ services:
- 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__DATABASE_TABLE_PREFIX="wallabag_"
- SYMFONY__ENV__MAILER_DSN=smtp://127.0.0.1
- SYMFONY__ENV__FROM_EMAIL=wallabag@example.com
- SYMFONY__ENV__DOMAIN_NAME=your-wallabag-url-instance.com
- SYMFONY__ENV__DOMAIN_NAME=https://your-wallabag-instance.wallabag.org
- SYMFONY__ENV__SERVER_NAME="Your wallabag instance"
ports:
- "80"
volumes:
- /opt/wallabag/images:/var/www/wallabag/web/assets/images
depends_on:
- db
- redis
db:
image: mariadb
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=wallaroot
volumes:
- /opt/wallabag/data:/var/lib/mysql
healthcheck:
test: ["CMD", "/usr/local/bin/healthcheck.sh", "--innodb_initialized"]
interval: 20s
timeout: 3s
redis:
image: redis:alpine
restart: unless-stopped
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.
@@ -166,7 +181,7 @@ server {
## Import worker
To run the [async redis import worker](http://doc.wallabag.org/en/master/developer/asynchronous.html#install-redis-for-asynchronous-tasks) use the following command:
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>
```

4
conftest.py Normal file
View File

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

View File

@@ -1,27 +1,116 @@
#!/bin/sh
# Exit when any command fails
set -e
provisioner () {
echo "Starting provisioner..."
if ! out=`ansible-playbook -i /etc/ansible/hosts /etc/ansible/entrypoint.yml -c local "$@"`;then
echo $out;
fi
echo "Provisioner finished."
COMMAND_ARG1="$1"
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
)"
}
if [ "$1" = "wallabag" ];then
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}
SQLITE_DB_DIR="/var/www/wallabag/data/db"
SQLITE_DB_FILEPATH="$SQLITE_DB_DIR/wallabag.sqlite"
# Replace environment variables
envsubst < /etc/wallabag/parameters.template.yml > app/config/parameters.yml
envsubst < /etc/wallabag/php-wallabag.template.ini > /etc/php84/conf.d/50_wallabag.ini
# 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
if [ "$SYMFONY__ENV__DATABASE_DRIVER" = "pdo_sqlite" ]; then
# mkdir and chown are mandatory for local folder binding
if [ ! -f "$SQLITE_DB_FILEPATH" ]; then
mkdir -p "$SQLITE_DB_DIR"
chown nobody: "$SQLITE_DB_DIR"
fi
if [ ! -s "$SQLITE_DB_FILEPATH" ]; then
echo "Configuring the SQLite database ..."
install_wallabag
fi
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/
fi
if [ "$1" = "import" ];then
provisioner --skip-tags=firstrun
cd /var/www/wallabag/
exec su -c "bin/console wallabag:import:redis-worker -e=prod $2 -vv" -s /bin/sh nobody
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 [ "$1" = "migrate" ];then
if [ "$COMMAND_ARG1" = "migrate" ]; then
provisioner
cd /var/www/wallabag/
exec su -c "bin/console doctrine:migrations:migrate --env=prod --no-interaction" -s /bin/sh nobody
fi

View File

@@ -1,163 +0,0 @@
---
- hosts: localhost
remote_user: root
vars:
database_driver: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_DRIVER')|default('pdo_sqlite', true) }}"
database_driver_class: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_DRIVER_CLASS')|default('~', true) }}"
database_host: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_HOST')|default('127.0.0.1', true) }}"
database_name: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_NAME')|default('symfony', true) }}"
database_password: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_PASSWORD')|default('~', true) }}"
database_port: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_PORT')|default('~', true) }}"
database_root_password_mariadb: "{{ lookup('env', 'MYSQL_ROOT_PASSWORD') }}"
database_root_user_postgres: "{{ lookup('env', 'POSTGRES_USER') }}"
database_root_password_postgres: "{{ lookup('env', 'POSTGRES_PASSWORD') }}"
database_user: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_USER')|default('root', true) }}"
database_charset: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_CHARSET')|default('utf8', true) }}"
populate_database: "{{ lookup('env', 'POPULATE_DATABASE')|default(True, true) }}"
locale: "{{ lookup('env', 'SYMFONY__ENV__LOCALE')|default('en', true) }}"
secret: "{{ lookup('env', 'SYMFONY__ENV__SECRET')|default('ovmpmAWXRCabNlMgzlzFXDYmCFfzGv', true) }}"
mailer_host: "{{ lookup('env', 'SYMFONY__ENV__MAILER_HOST')|default('127.0.0.1', true) }}"
mailer_user: "{{ lookup('env', 'SYMFONY__ENV__MAILER_USER')|default('~', true) }}"
mailer_password: "{{ lookup('env', 'SYMFONY__ENV__MAILER_PASSWORD')|default('~', true) }}"
from_email: "{{ lookup('env', 'SYMFONY__ENV__FROM_EMAIL')|default('wallabag@example.com', true) }}"
registration: "{{ lookup('env', 'SYMFONY__ENV__FOSUSER_REGISTRATION')|default('true', true) }}"
registration_mail_confirmation: "{{ lookup('env', 'SYMFONY__ENV__FOSUSER_CONFIRMATION')|default('true', true) }}"
domain_name: "{{ lookup('env', 'SYMFONY__ENV__DOMAIN_NAME')|default('https://your-wallabag-url-instance.com', true) }}"
redis_scheme: "{{ lookup('env', 'SYMFONY__ENV__REDIS_SCHEME')|default('tcp', true) }}"
redis_host: "{{ lookup('env', 'SYMFONY__ENV__REDIS_HOST')|default('redis', true) }}"
redis_port: "{{ lookup('env', 'SYMFONY__ENV__REDIS_PORT')|default('6379', true) }}"
redis_path: "{{ lookup('env', 'SYMFONY__ENV__REDIS_PATH')|default('~', true) }}"
redis_password: "{{ lookup('env', 'SYMFONY__ENV__REDIS_PASSWORD')|default('~', true) }}"
tasks:
- name: needed dirs
file:
path={{ item }}
state=directory
with_items:
- /var/www/wallabag/app
- /var/www/wallabag/app/config
- /var/www/wallabag/data
- /var/www/wallabag/data/assets
- /var/www/wallabag/data/db
notify: chown dir
tags:
- firstrun
- name: write parameters.yml
template:
src=templates/parameters.yml.j2
dest=/var/www/wallabag/app/config/parameters.yml
- 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 }}"
encoding="utf8mb4"
notify: run install
when: (database_driver == 'pdo_mysql') and
(populate_database == True)
tags:
- firstrun
- 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') and
(populate_database == True)
tags:
- firstrun
- name: postgresql db
postgresql_db:
name="{{ database_name }}"
state=present
login_host="{{ database_host }}"
port={{ database_port }}
login_user="{{ database_root_user_postgres }}"
login_password="{{ database_root_password_postgres }}"
notify: run install
when: (database_driver == 'pdo_pgsql') and
(populate_database == True)
tags:
- firstrun
- name: add postgresql user
postgresql_user:
name="{{ database_user }}"
password="{{ database_password }}"
encrypted=true
db={{ database_name }}
priv=ALL
login_host="{{ database_host }}"
port={{ database_port }}
login_user="{{ database_root_user_postgres }}"
login_password="{{ database_root_password_postgres }}"
state=present
when: (database_driver == 'pdo_pgsql') and
(database_user != 'postgres') and
(populate_database == True)
tags:
- firstrun
- 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,50 +0,0 @@
parameters:
database_driver: {{ database_driver }}
database_driver_class: {{ database_driver_class }}
database_host: {{ database_host }}
database_port: {{ database_port }}
database_name: {{ database_name }}
database_user: {{ database_user }}
database_password: {{ database_password }}
database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite"
database_table_prefix: wallabag_
database_socket: null
database_charset: {{ database_charset }}
domain_name: {{ domain_name }}
mailer_transport: smtp
mailer_host: {{ mailer_host }}
mailer_user: {{ mailer_user }}
mailer_password: {{ mailer_password }}
locale: {{ locale }}
# A secret key that's used to generate certain security-related tokens
secret: {{ secret }}
# two factor stuff
twofactor_auth: true
twofactor_sender: no-reply@wallabag.org
# fosuser stuff
fosuser_registration: {{ registration }}
fosuser_confirmation: {{ registration_mail_confirmation }}
from_email: {{ from_email }}
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: {{ redis_scheme }}
redis_host: {{ redis_host }}
redis_port: {{ redis_port }}
redis_path: {{ redis_path }}
redis_password: {{ redis_password }}

View File

@@ -10,7 +10,7 @@ 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 HTTPS $fe_https;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;

View File

@@ -25,12 +25,17 @@ http {
open_file_cache max=100;
client_max_body_size 100M;
map $http_x_forwarded_proto $fe_https {
default $https;
https on;
}
upstream php-upstream {
server 127.0.0.1:9000;
}
server {
listen [::]:80 ipv6only=off;
server_name _;
root /var/www/wallabag/web;
@@ -52,6 +57,7 @@ http {
# for more information).
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
fastcgi_read_timeout 300s;
# 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

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,3 @@
#!/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:-false}
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: ${SYMFONY__ENV__RABBITMQ_HOST:-localhost}
rabbitmq_port: ${SYMFONY__ENV__RABBITMQ_PORT:-5672}
rabbitmq_user: ${SYMFONY__ENV__RABBITMQ_USER:-guest}
rabbitmq_password: ${SYMFONY__ENV__RABBITMQ_PASSWORD:-guest}
rabbitmq_prefetch_count: ${SYMFONY__ENV__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

@@ -0,0 +1 @@
memory_limit = ${PHP_MEMORY_LIMIT:-128M}

View File

@@ -1,58 +0,0 @@
parameters:
database_driver: pdo_sqlite
database_host: 127.0.0.1
database_port: ~
database_name: symfony
database_user: root
database_password: ~
database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite"
database_table_prefix: wallabag_
database_socket: null
database_charset: utf8
database_driver_class: null
domain_name: https://your-wallabag-url-instance.com
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: ovmpmAWXRCabNlMgzlzFXDYmCFfzGv
# two factor stuff
twofactor_auth: true
twofactor_sender: no-reply@wallabag.org
# fosuser stuff
fosuser_registration: true
fosuser_confirmation: true
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: tcp
redis_host: localhost
redis_port: 6379
redis_path: null
redis_password: null

View File

@@ -18,6 +18,6 @@ services:
- "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
command: mariadbd --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --character-set-client-handshake=FALSE
environment:
- MYSQL_ROOT_PASSWORD=wallaroot

View File

@@ -10,7 +10,6 @@ services:
- POSTGRES_USER=my-super-user
- SYMFONY__ENV__SECRET=F00B4R
- SYMFONY__ENV__DATABASE_DRIVER=pdo_pgsql
- SYMFONY__ENV__DATABASE_DRIVER_CLASS=Wallabag\CoreBundle\Doctrine\DBAL\Driver\CustomPostgreSQLDriver
- SYMFONY__ENV__DATABASE_HOST=db
- SYMFONY__ENV__DATABASE_PORT=5432
- SYMFONY__ENV__DATABASE_NAME=wallabag

View File

@@ -11,7 +11,7 @@ services:
- SYMFONY__ENV__DATABASE_PORT=~
- SYMFONY__ENV__DATABASE_NAME=symfony
- SYMFONY__ENV__DATABASE_USER=root
- SYMFONY__ENV_DATABASE_PASSWORD=~
- SYMFONY__ENV__DATABASE_PASSWORD=~
- SYMFONY__ENV__SECRET=F00B4R
ports:
- "127.0.0.1:80:80"

View File

@@ -1,24 +1,63 @@
import pytest
import re
import requests
import os
from requests.exceptions import ConnectionError
URL = 'http://127.0.0.1:80'
@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
def test_accessing_login_page():
r = requests.get(URL, allow_redirects=True)
@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 'Login' in r.text
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():
def test_logging_in(wallabag_service):
client = requests.session()
r = client.get(URL, allow_redirects=True)
r = client.get(wallabag_service, allow_redirects=True)
jar = r.cookies
# get csrf token
@@ -39,7 +78,7 @@ def test_logging_in():
'_csrf_token': csrf
}
r = client.post(URL + '/login_check', cookies=jar, data=data)
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