Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM alpine:edge
MAINTAINER Marvin Steadfast <marvin@xsteadfastx.org>

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=~ \
Expand All @@ -26,6 +26,8 @@ RUN echo "@testing http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/
nginx \
pcre \
php7 \
php7-amqp@testing \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need it for RabbitMQ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the install command throws a error if its not installed.

php7-bcmath \
php7-ctype@testing \
php7-curl@testing \
php7-dom@testing \
Expand All @@ -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 \
Expand Down
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,23 @@ $ 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
```

## DB migration

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.

```
$ docker exec -t wallabag /var/www/wallabag/bin/console doctrine:migrations:migrate --env=prod --no-interaction
```

## docker-compose

It's a good way to use [docker-compose](https://docs.docker.com/compose/). Example:
Expand Down Expand Up @@ -90,6 +107,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.
Expand Down
10 changes: 9 additions & 1 deletion root/etc/ansible/entrypoint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
41 changes: 41 additions & 0 deletions root/etc/ansible/templates/parameters.yml.j2
Original file line number Diff line number Diff line change
@@ -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
25 changes: 19 additions & 6 deletions root/var/www/wallabag/app/config/parameters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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