forked from wallabag/docker
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 90265c1653 | |||
| fb020c3be6 | |||
| 80a3379a76 | |||
| 5203ab63b1 | |||
| 65b2e2c7a9 | |||
| 4de27027b9 |
@ -1,8 +1,8 @@
|
|||||||
FROM alpine:edge
|
FROM alpine:edge
|
||||||
MAINTAINER Marvin Steadfast <marvin@xsteadfastx.org>
|
MAINTAINER Marvin Steadfast <marvin@xsteadfastx.org>
|
||||||
|
|
||||||
ENV WALLABAG_VERSION=2.1.6 \
|
ARG WALLABAG_VERSION=2.2.1
|
||||||
POSTGRES_USER=postgres
|
ARG POSTGRES_USER=postgres
|
||||||
|
|
||||||
RUN echo "@testing http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
|
RUN echo "@testing http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
|
||||||
&& apk add --update \
|
&& apk add --update \
|
||||||
|
|||||||
20
README.md
20
README.md
@ -72,12 +72,18 @@ $ docker run -p 6379:6379 --name redis redis:alpine
|
|||||||
$ docker run -p 80:80 --link redis:redis wallabag/wallabag
|
$ 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
|
## docker-compose
|
||||||
@ -137,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.
|
||||||
|
|||||||
@ -4,5 +4,15 @@ if [ "$1" = "wallabag" ];then
|
|||||||
ansible-playbook -i /etc/ansible/hosts /etc/ansible/entrypoint.yml -c local
|
ansible-playbook -i /etc/ansible/hosts /etc/ansible/entrypoint.yml -c local
|
||||||
exec s6-svscan /etc/s6/
|
exec s6-svscan /etc/s6/
|
||||||
fi
|
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 "$@"
|
exec "$@"
|
||||||
|
|||||||
@ -34,6 +34,8 @@
|
|||||||
- /var/www/wallabag/data/assets
|
- /var/www/wallabag/data/assets
|
||||||
- /var/www/wallabag/data/db
|
- /var/www/wallabag/data/db
|
||||||
notify: chown dir
|
notify: chown dir
|
||||||
|
tags:
|
||||||
|
- firstrun
|
||||||
|
|
||||||
- name: write parameters.yml
|
- name: write parameters.yml
|
||||||
template:
|
template:
|
||||||
@ -71,6 +73,8 @@
|
|||||||
notify: run install
|
notify: run install
|
||||||
when: (database_driver == 'pdo_mysql') and
|
when: (database_driver == 'pdo_mysql') and
|
||||||
(populate_database == True)
|
(populate_database == True)
|
||||||
|
tags:
|
||||||
|
- firstrun
|
||||||
|
|
||||||
- name: add mariadb user
|
- name: add mariadb user
|
||||||
mysql_user:
|
mysql_user:
|
||||||
@ -86,6 +90,8 @@
|
|||||||
when: (database_driver == 'pdo_mysql') and
|
when: (database_driver == 'pdo_mysql') and
|
||||||
(database_user != 'root') and
|
(database_user != 'root') and
|
||||||
(populate_database == True)
|
(populate_database == True)
|
||||||
|
tags:
|
||||||
|
- firstrun
|
||||||
|
|
||||||
- name: postgresql db
|
- name: postgresql db
|
||||||
postgresql_db:
|
postgresql_db:
|
||||||
@ -98,6 +104,8 @@
|
|||||||
notify: run install
|
notify: run install
|
||||||
when: (database_driver == 'pdo_pgsql') and
|
when: (database_driver == 'pdo_pgsql') and
|
||||||
(populate_database == True)
|
(populate_database == True)
|
||||||
|
tags:
|
||||||
|
- firstrun
|
||||||
|
|
||||||
- name: add postgresql user
|
- name: add postgresql user
|
||||||
postgresql_user:
|
postgresql_user:
|
||||||
@ -113,6 +121,8 @@
|
|||||||
when: (database_driver == 'pdo_pgsql') and
|
when: (database_driver == 'pdo_pgsql') and
|
||||||
(database_user != 'postgres') and
|
(database_user != 'postgres') and
|
||||||
(populate_database == True)
|
(populate_database == True)
|
||||||
|
tags:
|
||||||
|
- firstrun
|
||||||
|
|
||||||
- name: remove cache
|
- name: remove cache
|
||||||
file:
|
file:
|
||||||
|
|||||||
@ -8,6 +8,7 @@ parameters:
|
|||||||
database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite"
|
database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite"
|
||||||
database_table_prefix: wallabag_
|
database_table_prefix: wallabag_
|
||||||
database_socket: null
|
database_socket: null
|
||||||
|
database_charset: utf8
|
||||||
|
|
||||||
mailer_transport: smtp
|
mailer_transport: smtp
|
||||||
mailer_host: {{ mailer_host }}
|
mailer_host: {{ mailer_host }}
|
||||||
@ -36,9 +37,14 @@ parameters:
|
|||||||
rabbitmq_port: 5672
|
rabbitmq_port: 5672
|
||||||
rabbitmq_user: guest
|
rabbitmq_user: guest
|
||||||
rabbitmq_password: guest
|
rabbitmq_password: guest
|
||||||
|
rabbitmq_prefetch_count: 10
|
||||||
|
|
||||||
# Redis processing
|
# Redis processing
|
||||||
redis_scheme: tcp
|
redis_scheme: tcp
|
||||||
redis_host: redis
|
redis_host: redis
|
||||||
redis_port: 6379
|
redis_port: 6379
|
||||||
redis_path: null
|
redis_path: null
|
||||||
|
redis_password: null
|
||||||
|
|
||||||
|
# sites credentials
|
||||||
|
sites_credentials: {}
|
||||||
|
|||||||
@ -8,6 +8,7 @@ parameters:
|
|||||||
database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite"
|
database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite"
|
||||||
database_table_prefix: wallabag_
|
database_table_prefix: wallabag_
|
||||||
database_socket: null
|
database_socket: null
|
||||||
|
database_charset: utf8
|
||||||
|
|
||||||
test_database_driver: pdo_sqlite
|
test_database_driver: pdo_sqlite
|
||||||
test_database_host: 127.0.0.1
|
test_database_host: 127.0.0.1
|
||||||
@ -44,9 +45,14 @@ parameters:
|
|||||||
rabbitmq_port: 5672
|
rabbitmq_port: 5672
|
||||||
rabbitmq_user: guest
|
rabbitmq_user: guest
|
||||||
rabbitmq_password: guest
|
rabbitmq_password: guest
|
||||||
|
rabbitmq_prefetch_count: 10
|
||||||
|
|
||||||
# Redis processing
|
# Redis processing
|
||||||
redis_scheme: tcp
|
redis_scheme: tcp
|
||||||
redis_host: localhost
|
redis_host: localhost
|
||||||
redis_port: 6379
|
redis_port: 6379
|
||||||
redis_path: null
|
redis_path: null
|
||||||
|
redis_password: null
|
||||||
|
|
||||||
|
# sites credentials
|
||||||
|
sites_credentials: {}
|
||||||
|
|||||||
Reference in New Issue
Block a user