diff --git a/Dockerfile b/Dockerfile index b289891..09f932e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM alpine:edge MAINTAINER Marvin Steadfast -ENV WALLABAG_VERSION=2.0.8 \ +ENV WALLABAG_VERSION=2.1.1 \ SYMFONY__ENV__DATABASE_DRIVER=pdo_sqlite \ SYMFONY__ENV__DATABASE_HOST=127.0.0.1 \ SYMFONY__ENV__DATABASE_PORT=~ \ @@ -26,6 +26,8 @@ RUN echo "@testing http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/ nginx \ pcre \ php7 \ + php7-amqp@testing \ + php7-bcmath \ php7-ctype@testing \ php7-curl@testing \ php7-dom@testing \ @@ -47,6 +49,7 @@ RUN echo "@testing http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/ py-psycopg2 \ py-simplejson \ s6 \ + tar \ && rm -rf /var/cache/apk/* RUN ln -s /usr/bin/php7 /usr/bin/php \ diff --git a/README.md b/README.md index 877de02..2a77c25 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,15 @@ $ docker run --name wallabag-db -e "POSTGRES_PASSWORD=my-secret-pw" -e "POSTGRES $ 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" -p 80:80 wallabag/wallabag ``` +## Redis + +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 80:80 --link redis:redis wallabag/wallabag +``` + ## docker-compose It's a good way to use [docker-compose](https://docs.docker.com/compose/). Example: @@ -90,6 +99,8 @@ services: - MYSQL_ROOT_PASSWORD=wallaroot volumes: - /opt/wallabag:/var/lib/mysql + redis: + image: redis:alpine ``` Note that you must fill out the mail related variables according to your mail config. diff --git a/root/etc/ansible/entrypoint.yml b/root/etc/ansible/entrypoint.yml index 1c9ae36..654cbeb 100644 --- a/root/etc/ansible/entrypoint.yml +++ b/root/etc/ansible/entrypoint.yml @@ -21,10 +21,18 @@ 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 + - 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 @@ -114,6 +122,12 @@ chdir: /var/www/wallabag notify: chown dir + - name: run migration + shell: php bin/console doctrine:migrations:migrate --env=prod + args: + chdir: /var/www/wallabag + notify: chown dir + - name: chown dir file: path=/var/www/wallabag diff --git a/root/etc/ansible/templates/parameters.yml.j2 b/root/etc/ansible/templates/parameters.yml.j2 new file mode 100644 index 0000000..964d43e --- /dev/null +++ b/root/etc/ansible/templates/parameters.yml.j2 @@ -0,0 +1,41 @@ +parameters: + database_driver: {{ database_driver }} + 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_ + + 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 + + # Redis processing + redis_host: redis + redis_port: 6379 diff --git a/root/var/www/wallabag/app/config/parameters.yml b/root/var/www/wallabag/app/config/parameters.yml index 61d8d1b..9138d46 100644 --- a/root/var/www/wallabag/app/config/parameters.yml +++ b/root/var/www/wallabag/app/config/parameters.yml @@ -17,20 +17,33 @@ parameters: test_database_path: "%kernel.root_dir%/../data/db/wallabag_test.sqlite" mailer_transport: smtp - mailer_host: %env.mailer_host% - mailer_user: %env.mailer_user% - mailer_password: %env.mailer_password% + 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: %env.secret% + secret: ovmpmAWXRCabNlMgzlzFXDYmCFfzGv # two factor stuff twofactor_auth: true - twofactor_sender: %env.from_email% + twofactor_sender: no-reply@wallabag.org # fosuser stuff + fosuser_registration: true fosuser_confirmation: true - from_email: %env.from_email% + from_email: no-reply@wallabag.org + + rss_limit: 50 + + # RabbitMQ processing + rabbitmq_host: localhost + rabbitmq_port: 5672 + rabbitmq_user: guest + rabbitmq_password: guest + + # Redis processing + redis_host: localhost + redis_port: 6379