1
0
mirror of https://github.com/wallabag/docker synced 2025-12-15 18:56:29 +00:00

7 Commits
2.0.8 ... 2.1.1

Author SHA1 Message Date
xsteadfastx
af6c68a312 Merge pull request #21 from xsteadfastx/master
2.1.1 image
2016-10-12 15:26:12 +02:00
Marvin Steadfast
1f4d9af316 added db migration part to the docs 2016-10-11 16:18:52 +02:00
Marvin Steadfast
6a5ab7c126 added new dependencies and added redis support
somehow there is a problem with the parameters.yml and environment
variables. ansible templates are now used.

database migration is still a big problem.
2016-10-11 16:18:52 +02:00
Nicolas Lœuillet
f66d2aeab0 Merge pull request #20 from tomsquest/patch-1
Fix typo `the a volume` -> `a volume`
2016-10-11 12:16:32 +02:00
Thomas Queste
0d2bf2999a Fix typo the a volume -> a volume 2016-10-11 12:08:50 +02:00
Jeremy Benoist
8bd298316a Merge pull request #18 from m0/m0-fixRunCommandInExample
fixes example run-commands in README
2016-09-17 07:53:59 +02:00
Moritz Maisel
d9f9efcf13 fixes example run-commands in README 2016-09-17 01:04:01 +02:00
5 changed files with 95 additions and 11 deletions

View File

@@ -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=~ \
@@ -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 \

View File

@@ -37,7 +37,7 @@ The easiest way to start wallabag is to use the SQLite backend. You can spin tha
$ docker run -p 80:80 wallabag/wallabag
```
and point your browser to `http://localhost:80`. For persistent storage you should start the container with the a volume:
and point your browser to `http://localhost:80`. For persistent storage you should start the container with a volume:
```
$ docker run -v /opt/wallabag:/var/www/wallabag/data -p 80:80 wallabag/wallabag
@@ -48,7 +48,7 @@ $ docker run -v /opt/wallabag:/var/www/wallabag/data -p 80:80 wallabag/wallabag
For using MariaDB or MySQL you have to define some environment variables with the container. Example:
```
$ docker run docker run --name wallabag-db -e "MYSQL_ROOT_PASSWORD=my-secret-pw" -d mariadb
$ docker run --name wallabag-db -e "MYSQL_ROOT_PASSWORD=my-secret-pw" -d mariadb
$ docker run --name wallabag --link wallabag-db:wallabag-db -e "MYSQL_ROOT_PASSWORD=my-secret-pw" -e "SYMFONY__ENV__DATABASE_DRIVER=pdo_mysql" -e "SYMFONY__ENV__DATABASE_HOST=wallabag-db" -e "SYMFONY__ENV__DATABASE_PORT=3306" -e "SYMFONY__ENV__DATABASE_NAME=wallabag" -e "SYMFONY__ENV__DATABASE_USER=wallabag" -e "SYMFONY__ENV__DATABASE_PASSWORD=wallapass" -p 80:80 wallabag/wallabag
```
@@ -57,10 +57,27 @@ $ docker run --name wallabag --link wallabag-db:wallabag-db -e "MYSQL_ROOT_PASSW
For using PostgreSQL you have to define some environment variables with the container. Example:
```
$ docker run docker run --name wallabag-db -e "POSTGRES_PASSWORD=my-secret-pw" -e "POSTGRES_USER=my-super-user" -d postgres
$ docker run --name wallabag-db -e "POSTGRES_PASSWORD=my-secret-pw" -e "POSTGRES_USER=my-super-user" -d 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:
@@ -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.

View File

@@ -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

View File

@@ -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

View File

@@ -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