mirror of
https://github.com/wallabag/docker
synced 2025-12-13 09:46:27 +00:00
Merge pull request #45 from janLo/import-worker
Add option to run redis based import workers
This commit is contained in:
@@ -137,3 +137,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.
|
||||
|
||||
@@ -4,5 +4,10 @@ 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
|
||||
|
||||
exec "$@"
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
- /var/www/wallabag/data/assets
|
||||
- /var/www/wallabag/data/db
|
||||
notify: chown dir
|
||||
tags:
|
||||
- firstrun
|
||||
|
||||
- name: write parameters.yml
|
||||
template:
|
||||
@@ -59,6 +61,8 @@
|
||||
port="{{ database_port }}"
|
||||
when: (database_driver == 'pdo_mysql') or
|
||||
(database_driver == 'pdo_pgsql')
|
||||
tags:
|
||||
- firstrun
|
||||
|
||||
- name: add mariadb db
|
||||
mysql_db:
|
||||
@@ -71,6 +75,8 @@
|
||||
notify: run install
|
||||
when: (database_driver == 'pdo_mysql') and
|
||||
(populate_database == True)
|
||||
tags:
|
||||
- firstrun
|
||||
|
||||
- name: add mariadb user
|
||||
mysql_user:
|
||||
@@ -86,6 +92,8 @@
|
||||
when: (database_driver == 'pdo_mysql') and
|
||||
(database_user != 'root') and
|
||||
(populate_database == True)
|
||||
tags:
|
||||
- firstrun
|
||||
|
||||
- name: postgresql db
|
||||
postgresql_db:
|
||||
@@ -98,6 +106,8 @@
|
||||
notify: run install
|
||||
when: (database_driver == 'pdo_pgsql') and
|
||||
(populate_database == True)
|
||||
tags:
|
||||
- firstrun
|
||||
|
||||
- name: add postgresql user
|
||||
postgresql_user:
|
||||
@@ -113,6 +123,8 @@
|
||||
when: (database_driver == 'pdo_pgsql') and
|
||||
(database_user != 'postgres') and
|
||||
(populate_database == True)
|
||||
tags:
|
||||
- firstrun
|
||||
|
||||
- name: remove cache
|
||||
file:
|
||||
|
||||
Reference in New Issue
Block a user