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

33 Commits
2.1.1 ... 2.2.1

Author SHA1 Message Date
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
12 changed files with 110 additions and 46 deletions

View File

@@ -7,6 +7,7 @@ services:
- docker
env:
- DB_TYPE=default
- DB_TYPE=sqlite
- DB_TYPE=mariadb
- DB_TYPE=postgresql

View File

@@ -1,20 +1,8 @@
FROM alpine:edge
MAINTAINER Marvin Steadfast <marvin@xsteadfastx.org>
ENV WALLABAG_VERSION=2.1.1 \
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=~ \
POSTGRES_USER=postgres \
SYMFONY__ENV__SECRET=ovmpmAWXRCabNlMgzlzFXDYmCFfzGv \
SYMFONY__ENV__MAILER_HOST=127.0.0.1 \
SYMFONY__ENV__MAILER_USER=~ \
SYMFONY__ENV__MAILER_PASSWORD=~ \
SYMFONY__ENV__FROM_EMAIL=wallabag@example.com
ARG WALLABAG_VERSION=2.2.1
ARG POSTGRES_USER=postgres
RUN echo "@testing http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
&& apk add --update \
@@ -44,6 +32,7 @@ RUN echo "@testing http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/
php7-phar@testing \
php7-session@testing \
php7-xml@testing \
php7-zlib@testing \
php7@testing\
py-mysqldb \
py-psycopg2 \
@@ -68,8 +57,6 @@ RUN cd /var/www/wallabag \
RUN chown -R nobody:nobody /var/www/wallabag
RUN chmod +x /entrypoint.sh
EXPOSE 80
ENTRYPOINT ["/entrypoint.sh"]
CMD ["wallabag"]

View File

@@ -28,6 +28,8 @@ Default login is `wallabag:wallabag`.
- `-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 POPULATE_DATABASE=...`(defaults to "True". Does the DB has to be populated or is it an existing one)
## SQLite
@@ -66,16 +68,22 @@ $ docker run --name wallabag --link wallabag-db:wallabag-db -e "POSTGRES_PASSWOR
To use redis support a linked redis container with the name `redis` is needed.
```
$ docker run -p 6379:6379 redis:alpine redis
$ docker run -p 6379:6379 --name redis redis:alpine
$ docker run -p 80:80 --link redis:redis wallabag/wallabag
```
## DB migration
## Upgrading
If there is a version upgrade that needs a database migration, you should start the container with the new image and run the migration command.
If there is a version upgrade that needs a database migration. The most easy way to do is running the `migrate` command:
```
$ docker exec -t wallabag /var/www/wallabag/bin/console doctrine:migrations:migrate --env=prod --no-interaction
$ 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
@@ -135,3 +143,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.

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

@@ -4,5 +4,15 @@ if [ "$1" = "wallabag" ];then
ansible-playbook -i /etc/ansible/hosts /etc/ansible/entrypoint.yml -c local
exec s6-svscan /etc/s6/
fi
if [ "$1" = "import" ];then
ansible-playbook -i /etc/ansible/hosts /etc/ansible/entrypoint.yml -c local --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
ansible-playbook -i /etc/ansible/hosts /etc/ansible/entrypoint.yml -c local
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,15 +4,22 @@
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_driver: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_DRIVER')|default('pdo_sqlite', 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') }}"
database_user: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_USER')|default('root', true) }}"
populate_database: "{{ lookup('env', 'POPULATE_DATABASE')|default(True, 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) }}"
tasks:
@@ -27,6 +34,8 @@
- /var/www/wallabag/data/assets
- /var/www/wallabag/data/db
notify: chown dir
tags:
- firstrun
- name: write parameters.yml
template:
@@ -62,7 +71,10 @@
login_user=root
login_password="{{ database_root_password_mariadb }}"
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:
@@ -76,7 +88,10 @@
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:
@@ -87,7 +102,10 @@
login_user="{{ database_root_user_postgres }}"
login_password="{{ database_root_password_postgres }}"
notify: run install
when: database_driver == 'pdo_pgsql'
when: (database_driver == 'pdo_pgsql') and
(populate_database == True)
tags:
- firstrun
- name: add postgresql user
postgresql_user:
@@ -101,7 +119,10 @@
login_password="{{ database_root_password_postgres }}"
state=present
when: (database_driver == 'pdo_pgsql') and
(database_user != 'postgres')
(database_user != 'postgres') and
(populate_database == True)
tags:
- firstrun
- name: remove cache
file:

View File

@@ -7,26 +7,28 @@ parameters:
database_password: {{ database_password }}
database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite"
database_table_prefix: wallabag_
database_socket: null
database_charset: utf8
mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_user: ~
mailer_password: ~
mailer_host: {{ mailer_host }}
mailer_user: {{ mailer_user }}
mailer_password: {{ mailer_password }}
locale: en
# A secret key that's used to generate certain security-related tokens
secret: ovmpmAWXRCabNlMgzlzFXDYmCFfzGv
secret: {{ secret }}
# two factor stuff
twofactor_auth: true
twofactor_sender: no-reply@wallabag.org
# fosuser stuff
fosuser_registration: true
fosuser_registration: {{ registration }}
fosuser_confirmation: true
from_email: no-reply@wallabag.org
from_email: {{ from_email }}
rss_limit: 50
@@ -35,7 +37,14 @@ parameters:
rabbitmq_port: 5672
rabbitmq_user: guest
rabbitmq_password: guest
rabbitmq_prefetch_count: 10
# Redis processing
redis_scheme: tcp
redis_host: redis
redis_port: 6379
redis_path: null
redis_password: null
# sites credentials
sites_credentials: {}

View File

@@ -23,7 +23,7 @@ http {
gzip on;
gzip_disable "msie6";
open_file_cache max=100;
client_max_body_size 50M;
client_max_body_size 100M;
upstream php-upstream {

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,14 @@
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
test_database_driver: pdo_sqlite
test_database_host: 127.0.0.1
@@ -43,7 +45,14 @@ parameters:
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
# sites credentials
sites_credentials: {}

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"