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

128 Commits
2.0.2 ... 2.3.7

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

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

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

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

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

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

3
.gitignore vendored Normal file
View File

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

26
.travis.yml Normal file
View File

@@ -0,0 +1,26 @@
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,63 +1,65 @@
FROM alpine:edge
MAINTAINER Marvin Steadfast <marvin@xsteadfastx.org>
FROM alpine:latest
ENV WALLABAG_VERSION=2.0.2 \
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
LABEL maintainer "Marvin Steadfast <marvin@xsteadfastx.org>"
RUN echo "@testing http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
&& apk add --update \
ARG WALLABAG_VERSION=2.3.7
RUN set -ex \
&& apk update \
&& apk upgrade --available \
&& apk add \
ansible \
curl \
git \
libwebp@testing \
libwebp \
mariadb-client \
nginx \
pcre \
php7 \
php7-ctype@testing \
php7-curl@testing \
php7-dom@testing \
php7-fpm@testing \
php7-gd@testing \
php7-gettext@testing \
php7-iconv@testing \
php7-json@testing \
php7-mbstring@testing \
php7-openssl@testing \
php7-pdo_mysql@testing \
php7-pdo_sqlite@testing \
php7-phar@testing \
php7-session@testing \
php7-xml@testing \
php7@testing\
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 \
rabbitmq-c \
s6 \
&& rm -rf /var/cache/apk/*
RUN ln -s /usr/bin/php7 /usr/bin/php \
tar \
tzdata \
&& rm -rf /var/cache/apk/* \
&& ln -sf /dev/stdout /var/log/nginx/access.log \
&& ln -sf /dev/stderr /var/log/nginx/error.log
RUN curl -s http://getcomposer.org/installer | php \
&& mv composer.phar /usr/local/bin/composer
RUN 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 \
&& 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
COPY root /
RUN cd /var/www/wallabag \
&& SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist
RUN chown -R nobody:nobody /var/www/wallabag
RUN chmod +x /entrypoint.sh
RUN set -ex \
&& cd /var/www/wallabag \
&& SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist --no-progress \
&& chown -R nobody:nobody /var/www/wallabag
EXPOSE 80
ENTRYPOINT ["/entrypoint.sh"]

105
README.md
View File

@@ -1,5 +1,9 @@
# What is wallabag?
[![Build Status](https://travis-ci.org/wallabag/docker.svg?branch=master)](https://travis-ci.org/wallabag/docker)
[![Docker Stars](https://img.shields.io/docker/stars/wallabag/wallabag.svg?maxAge=2592000)](https://hub.docker.com/r/wallabag/wallabag/)
[![Docker Pulls](https://img.shields.io/docker/pulls/wallabag/wallabag.svg?maxAge=2592000)](https://hub.docker.com/r/wallabag/wallabag/)
[wallabag](https://www.wallabag.org/) is a self hostable application for saving web pages. Unlike other services, wallabag is free (as in freedom) and open source.
With this application you will not miss content anymore. Click, save, read it when you want. It saves the content you select so that you can read it when you have time.
@@ -11,35 +15,91 @@ 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_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__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__FOSUSER_CONFIRMATION=...`(defaults to "true", enable or disable registration confirmation)
- `-e SYMFONY__ENV__DOMAIN_NAME=...` defaults to "https://your-wallabag-url-instance.com", the URL of your wallabag instance)
- `-e SYMFONY__ENV__REDIS_SCHEME=...` (defaults to "tcp", protocol to use to communicate with the target server (tcp, unix, or http))
- `-e SYMFONY__ENV__REDIS_HOST=...` (defaults to "redis", IP or hostname of the target server)
- `-e SYMFONY__ENV__REDIS_PORT=...` (defaults to "6379", port of the target host)
- `-e SYMFONY__ENV__REDIS_PATH=...`(defaults to "~", path of the unix socket file)
- `-e SYMFONY__ENV__REDIS_PASSWORD=...` (defaults to "~", this is the password defined in the Redis server configuration)
- `-e POPULATE_DATABASE=...`(defaults to "True". Does the DB has to be populated or is it an existing one)
## sqlite
## SQLite
The easiest way to start wallabag is to use the sqlite backend. You can spin that up with
The easiest way to start wallabag is to use the SQLite backend. You can spin that up with
```
$ docker run -p 80:80 xsteadfastx/wallabag
$ docker run -p 80:80 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:80`. 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 wallabag/wallabag
```
## mariadb / mysql
## MariaDB / MySQL
For using mariadb or mysql you have to define some environment variables with the container. Example:
For using MariaDB or MySQL you have to define some environment variables with the container. Example:
```
$ docker run docker run --name wallabag-db -e "MYSQL_ROOT_PASSWORD=my-secret-pw" -d mariadb
$ docker run --name wallabag --link wallabag-db:wallabag-db -e "MYSQL_ROOT_PASSWORD=my-secret-pw" -e "SYMFONY__ENV__DATABASE_DRIVER=pdo_mysql" -e "SYMFONY__ENV__DATABASE_HOST=wallabag-db" -e "SYMFONY__ENV__DATABASE_PORT=3306" -e "SYMFONY__ENV__DATABASE_NAME=wallabag" -e "SYMFONY__ENV__DATABASE_USER=wallabag" -e "SYMFONY__ENV__DATABASE_PASSWORD=wallapass" -p 80:80 xsteadfastx/wallabag
$ docker run --name wallabag-db -e "MYSQL_ROOT_PASSWORD=my-secret-pw" -d mariadb
$ docker run --name wallabag --link wallabag-db:wallabag-db -e "MYSQL_ROOT_PASSWORD=my-secret-pw" -e "SYMFONY__ENV__DATABASE_DRIVER=pdo_mysql" -e "SYMFONY__ENV__DATABASE_HOST=wallabag-db" -e "SYMFONY__ENV__DATABASE_PORT=3306" -e "SYMFONY__ENV__DATABASE_NAME=wallabag" -e "SYMFONY__ENV__DATABASE_USER=wallabag" -e "SYMFONY__ENV__DATABASE_PASSWORD=wallapass" -e "SYMFONY__ENV__DATABASE_CHARSET=utf8mb4" -p 80:80 wallabag/wallabag
```
## PostgreSQL
For using PostgreSQL you have to define some environment variables with the container. Example:
```
$ 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
```
## 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 --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
```
## 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
@@ -47,11 +107,10 @@ $ docker run --name wallabag --link wallabag-db:wallabag-db -e "MYSQL_ROOT_PASSW
It's a good way to use [docker-compose](https://docs.docker.com/compose/). Example:
```
version: '2'
version: '3'
services:
wallabag:
build:
context: wallabag/
image: wallabag/wallabag
environment:
- MYSQL_ROOT_PASSWORD=wallaroot
- SYMFONY__ENV__DATABASE_DRIVER=pdo_mysql
@@ -60,16 +119,28 @@ services:
- SYMFONY__ENV__DATABASE_NAME=wallabag
- SYMFONY__ENV__DATABASE_USER=wallabag
- SYMFONY__ENV__DATABASE_PASSWORD=wallapass
- SYMFONY__ENV__DATABASE_CHARSET=utf8mb4
- SYMFONY__ENV__MAILER_HOST=127.0.0.1
- SYMFONY__ENV__MAILER_USER=~
- SYMFONY__ENV__MAILER_PASSWORD=~
- SYMFONY__ENV__FROM_EMAIL=wallabag@example.com
- SYMFONY__ENV__DOMAIN_NAME=your-wallabag-url-instance.com
ports:
- "80"
volumes:
- /opt/wallabag/images:/var/www/wallabag/web/assets/images
db:
image: mariadb
environment:
- MYSQL_ROOT_PASSWORD=wallaroot
volumes:
- /opt/wallabag:/var/lib/mysql
- /opt/wallabag/data:/var/lib/mysql
redis:
image: redis:alpine
```
Note that you must fill out the mail related variables according to your mail config.
## nginx
I use nginx to make wallabag public available. This is a example how to use it:
@@ -92,3 +163,11 @@ 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:
```
$ 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.

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

@@ -1,8 +1,28 @@
#!/bin/sh
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."
}
if [ "$1" = "wallabag" ];then
ansible-playbook -i /etc/ansible/hosts /etc/ansible/entrypoint.yml -c local
provisioner
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
fi
if [ "$1" = "migrate" ];then
provisioner
cd /var/www/wallabag/
exec su -c "bin/console doctrine:migrations:migrate --env=prod --no-interaction" -s /bin/sh nobody
fi
exec "$@"

View File

@@ -4,13 +4,32 @@
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: "{{ lookup('env', 'MYSQL_ROOT_PASSWORD') }}"
database_user: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_USER') }}"
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:
@@ -19,9 +38,19 @@
path={{ item }}
state=directory
with_items:
- /var/www/wallabag/data/db
- /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
@@ -39,18 +68,24 @@
- name: wait for db container
wait_for:
host="{{ database_host }}"
port=3306
when: database_driver == 'pdo_mysql'
port="{{ database_port }}"
when: (database_driver == 'pdo_mysql') or
(database_driver == 'pdo_pgsql')
- name: mariadb db
- 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 }}"
login_password="{{ database_root_password_mariadb }}"
encoding="utf8mb4"
notify: run install
when: database_driver == 'pdo_mysql'
when: (database_driver == 'pdo_mysql') and
(populate_database == True)
tags:
- firstrun
- name: add mariadb user
mysql_user:
@@ -59,12 +94,47 @@
password="{{ database_password }}"
priv={{ database_name }}.*:ALL
login_host="{{ database_host }}"
login_port="{{ database_port }}"
login_port={{ database_port }}
login_user=root
login_password="{{ database_root_password }}"
login_password="{{ database_root_password_mariadb }}"
state=present
when: (database_driver == 'pdo_mysql') and
(database_user != 'root')
(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:

View File

@@ -0,0 +1,50 @@
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

@@ -23,6 +23,7 @@ http {
gzip on;
gzip_disable "msie6";
open_file_cache max=100;
client_max_body_size 100M;
upstream php-upstream {
@@ -57,8 +58,8 @@ http {
internal;
}
error_log /var/log/nginx/access.log;
access_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
}
}

View File

@@ -268,7 +268,7 @@ output_buffering = 4096
; Note: You need to use zlib.output_handler instead of the standard
; output_handler, or otherwise the output will be corrupted.
; http://php.net/zlib.output-compression
zlib.output_compression = Off
zlib.output_compression = On
; http://php.net/zlib.output-compression-level
;zlib.output_compression_level = -1
@@ -670,7 +670,7 @@ auto_globals_jit = On
; Its value may be 0 to disable the limit. It is ignored if POST data reading
; is disabled through enable_post_data_reading.
; http://php.net/post-max-size
post_max_size = 20G
post_max_size = 100M
; Automatically add files before PHP document.
; http://php.net/auto-prepend-file
@@ -802,7 +802,7 @@ upload_tmp_dir = /tmp/
; Maximum allowed size for uploaded files.
; 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
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,12 +1,17 @@
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_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
@@ -24,13 +29,30 @@ parameters:
locale: en
# A secret key that's used to generate certain security-related tokens
secret: %env.secret%
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

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

View File

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

View File

@@ -0,0 +1,25 @@
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_DRIVER_CLASS=Wallabag\CoreBundle\Doctrine\DBAL\Driver\CustomPostgreSQLDriver
- SYMFONY__ENV__DATABASE_HOST=db
- SYMFONY__ENV__DATABASE_PORT=5432
- SYMFONY__ENV__DATABASE_NAME=wallabag
- SYMFONY__ENV__DATABASE_USER=wallabag
- SYMFONY__ENV__DATABASE_PASSWORD=wallapass
ports:
- "127.0.0.1:80:80"
db:
image: postgres:10.3
environment:
- POSTGRES_PASSWORD=my-secret-pw
- POSTGRES_USER=my-super-user

View File

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

47
tests/test_login.py Normal file
View File

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