mirror of
https://github.com/wallabag/docker
synced 2025-12-13 17:56:31 +00:00
Compare commits
82 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71dd17939c | ||
|
|
66c3967ef5 | ||
|
|
6d7fdd92c8 | ||
|
|
f9f5b5c68c | ||
|
|
386924f2cc | ||
|
|
3d3f11fb85 | ||
|
|
25bf47149f | ||
|
|
0cee0470de | ||
|
|
b626873351 | ||
|
|
e741136827 | ||
|
|
b92f4c2740 | ||
|
|
040655c3c4 | ||
|
|
5f78ae9a21 | ||
|
|
e510f9db1b | ||
|
|
926e8c7445 | ||
|
|
7d7b1a846f | ||
|
|
8fd1421d36 | ||
|
|
f86d945624 | ||
|
|
a37317f55f | ||
|
|
eeead4ff44 | ||
|
|
16a1a1236a | ||
|
|
2460f55662 | ||
|
|
0fe76aa896 | ||
|
|
0f52136d3d | ||
|
|
de684f5a44 | ||
|
|
bf0316bac6 | ||
|
|
ae7aefe8e4 | ||
|
|
ef910d313c | ||
|
|
51e3b625c0 | ||
|
|
dcaa684897 | ||
|
|
6edcd745c4 | ||
|
|
7a476cdab0 | ||
|
|
6a7bbbb8d0 | ||
|
|
e5456115c1 | ||
|
|
7b68684720 | ||
|
|
b67e80a9f8 | ||
|
|
434b17cd8f | ||
|
|
5123e9de38 | ||
|
|
5682aefa74 | ||
|
|
bf82658342 | ||
|
|
abb0647cbd | ||
|
|
6f22d1ef68 | ||
|
|
d1c050662b | ||
|
|
038a5ea6c7 | ||
|
|
c42058bf0f | ||
|
|
3e4cd35253 | ||
|
|
8c15693e12 | ||
|
|
f6e4816eb5 | ||
|
|
bff2dd3d8b | ||
|
|
90265c1653 | ||
|
|
fb020c3be6 | ||
|
|
80a3379a76 | ||
|
|
5203ab63b1 | ||
|
|
65b2e2c7a9 | ||
|
|
4de27027b9 | ||
|
|
924d663c86 | ||
|
|
ec8f599298 | ||
|
|
125aad2c1c | ||
|
|
606b7d681c | ||
|
|
fdaaf37381 | ||
|
|
2b13ed0703 | ||
|
|
e41a237604 | ||
|
|
724d6492bc | ||
|
|
267618a519 | ||
|
|
0fe227a0cc | ||
|
|
d42d34cdac | ||
|
|
58cc845c75 | ||
|
|
c553787564 | ||
|
|
73187d7ce1 | ||
|
|
f7bd58c73a | ||
|
|
ba8f6ec5d3 | ||
|
|
68db53e09c | ||
|
|
530e59329a | ||
|
|
2ae7dee8af | ||
|
|
c2052c2681 | ||
|
|
310d55bdea | ||
|
|
76f5ecb61e | ||
|
|
92f5db7ba9 | ||
|
|
ee4a7e4a46 | ||
|
|
e0bc4e895d | ||
|
|
ed6b4437b8 | ||
|
|
af2fb30389 |
@@ -7,6 +7,7 @@ services:
|
|||||||
- docker
|
- docker
|
||||||
|
|
||||||
env:
|
env:
|
||||||
|
- DB_TYPE=default
|
||||||
- DB_TYPE=sqlite
|
- DB_TYPE=sqlite
|
||||||
- DB_TYPE=mariadb
|
- DB_TYPE=mariadb
|
||||||
- DB_TYPE=postgresql
|
- DB_TYPE=postgresql
|
||||||
|
|||||||
91
Dockerfile
91
Dockerfile
@@ -1,74 +1,63 @@
|
|||||||
FROM alpine:edge
|
FROM alpine:latest
|
||||||
MAINTAINER Marvin Steadfast <marvin@xsteadfastx.org>
|
|
||||||
|
|
||||||
ENV WALLABAG_VERSION=2.1.1 \
|
LABEL maintainer "Marvin Steadfast <marvin@xsteadfastx.org>"
|
||||||
SYMFONY__ENV__DATABASE_DRIVER=pdo_sqlite \
|
|
||||||
SYMFONY__ENV__DATABASE_HOST=127.0.0.1 \
|
|
||||||
SYMFONY__ENV__DATABASE_PORT=~ \
|
|
||||||
SYMFONY__ENV__DATABASE_NAME=symfony \
|
|
||||||
SYMFONY__ENV__DATABASE_USER=root \
|
|
||||||
SYMFONY__ENV__DATABASE_PASSWORD=~ \
|
|
||||||
POSTGRES_USER=postgres \
|
|
||||||
SYMFONY__ENV__SECRET=ovmpmAWXRCabNlMgzlzFXDYmCFfzGv \
|
|
||||||
SYMFONY__ENV__MAILER_HOST=127.0.0.1 \
|
|
||||||
SYMFONY__ENV__MAILER_USER=~ \
|
|
||||||
SYMFONY__ENV__MAILER_PASSWORD=~ \
|
|
||||||
SYMFONY__ENV__FROM_EMAIL=wallabag@example.com
|
|
||||||
|
|
||||||
|
ARG WALLABAG_VERSION=2.3.5
|
||||||
|
|
||||||
RUN echo "@testing http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
|
RUN set -ex \
|
||||||
&& apk add --update \
|
&& apk update \
|
||||||
|
&& apk upgrade --available \
|
||||||
|
&& apk add \
|
||||||
ansible \
|
ansible \
|
||||||
curl \
|
curl \
|
||||||
git \
|
git \
|
||||||
libwebp@testing \
|
libwebp \
|
||||||
mariadb-client \
|
mariadb-client \
|
||||||
nginx \
|
nginx \
|
||||||
pcre \
|
pcre \
|
||||||
php7 \
|
php7 \
|
||||||
php7-amqp@testing \
|
php7-amqp \
|
||||||
php7-bcmath \
|
php7-bcmath \
|
||||||
php7-ctype@testing \
|
php7-ctype \
|
||||||
php7-curl@testing \
|
php7-curl \
|
||||||
php7-dom@testing \
|
php7-dom \
|
||||||
php7-fpm@testing \
|
php7-fpm \
|
||||||
php7-gd@testing \
|
php7-gd \
|
||||||
php7-gettext@testing \
|
php7-gettext \
|
||||||
php7-iconv@testing \
|
php7-iconv \
|
||||||
php7-json@testing \
|
php7-json \
|
||||||
php7-mbstring@testing \
|
php7-mbstring \
|
||||||
php7-openssl@testing \
|
php7-openssl \
|
||||||
php7-pdo_mysql@testing \
|
php7-pdo_mysql \
|
||||||
php7-pdo_pgsql@testing \
|
php7-pdo_pgsql \
|
||||||
php7-pdo_sqlite@testing \
|
php7-pdo_sqlite \
|
||||||
php7-phar@testing \
|
php7-phar \
|
||||||
php7-session@testing \
|
php7-session \
|
||||||
php7-xml@testing \
|
php7-simplexml \
|
||||||
php7@testing\
|
php7-tokenizer \
|
||||||
|
php7-xml \
|
||||||
|
php7-zlib \
|
||||||
|
php7-sockets \
|
||||||
|
php7-xmlreader \
|
||||||
py-mysqldb \
|
py-mysqldb \
|
||||||
py-psycopg2 \
|
py-psycopg2 \
|
||||||
py-simplejson \
|
py-simplejson \
|
||||||
|
rabbitmq-c \
|
||||||
s6 \
|
s6 \
|
||||||
tar \
|
tar \
|
||||||
&& rm -rf /var/cache/apk/*
|
&& rm -rf /var/cache/apk/* \
|
||||||
|
|
||||||
RUN ln -s /usr/bin/php7 /usr/bin/php \
|
|
||||||
&& ln -sf /dev/stdout /var/log/nginx/access.log \
|
&& ln -sf /dev/stdout /var/log/nginx/access.log \
|
||||||
&& ln -sf /dev/stderr /var/log/nginx/error.log
|
&& ln -sf /dev/stderr /var/log/nginx/error.log \
|
||||||
|
&& curl -s https://getcomposer.org/installer | php \
|
||||||
RUN curl -s http://getcomposer.org/installer | php \
|
&& mv composer.phar /usr/local/bin/composer \
|
||||||
&& mv composer.phar /usr/local/bin/composer
|
&& git clone --branch $WALLABAG_VERSION --depth 1 https://github.com/wallabag/wallabag.git /var/www/wallabag
|
||||||
|
|
||||||
RUN git clone --branch $WALLABAG_VERSION --depth 1 https://github.com/wallabag/wallabag.git /var/www/wallabag
|
|
||||||
|
|
||||||
COPY root /
|
COPY root /
|
||||||
|
|
||||||
RUN cd /var/www/wallabag \
|
RUN set -ex \
|
||||||
&& SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist
|
&& cd /var/www/wallabag \
|
||||||
|
&& SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist \
|
||||||
RUN chown -R nobody:nobody /var/www/wallabag
|
&& chown -R nobody:nobody /var/www/wallabag
|
||||||
|
|
||||||
RUN chmod +x /entrypoint.sh
|
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|||||||
61
README.md
61
README.md
@@ -18,16 +18,27 @@ Default login is `wallabag:wallabag`.
|
|||||||
- `-e POSTGRES_PASSWORD=...` (needed for the posgres container to initialise and for the entrypoint in the wallabag container to create a database and user if not there)
|
- `-e POSTGRES_PASSWORD=...` (needed for the posgres container to initialise and for the entrypoint in the wallabag container to create a database and user if not there)
|
||||||
- `-e POSTGRES_USER=...` (needed for the posgres container to initialise and for the entrypoint in the wallabag container to create a database and user if not there)
|
- `-e POSTGRES_USER=...` (needed for the posgres container to initialise and for the entrypoint in the wallabag container to create a database and user if not there)
|
||||||
- `-e SYMFONY__ENV__DATABASE_DRIVER=...` (defaults to "pdo_sqlite", this sets the database driver to use)
|
- `-e SYMFONY__ENV__DATABASE_DRIVER=...` (defaults to "pdo_sqlite", this sets the database driver to use)
|
||||||
|
- `-e SYMFONY__ENV__DATABASE_DRIVER_CLASS=...` (sets the database driver class to use)
|
||||||
- `-e SYMFONY__ENV__DATABASE_HOST=...` (defaults to "127.0.0.1", if use mysql this should be the name of the mariadb container)
|
- `-e SYMFONY__ENV__DATABASE_HOST=...` (defaults to "127.0.0.1", if use mysql this should be the name of the mariadb container)
|
||||||
- `-e SYMFONY__ENV__DATABASE_PORT=...` (port of the database host)
|
- `-e SYMFONY__ENV__DATABASE_PORT=...` (port of the database host)
|
||||||
- `-e SYMFONY__ENV__DATABASE_NAME=...`(defaults to "symfony", this is the name of the database to use)
|
- `-e SYMFONY__ENV__DATABASE_NAME=...`(defaults to "symfony", this is the name of the database to use)
|
||||||
- `-e SYMFONY__ENV__DATABASE_USER=...` (defaults to "root", this is the name of the database user to use)
|
- `-e SYMFONY__ENV__DATABASE_USER=...` (defaults to "root", this is the name of the database user to use)
|
||||||
- `-e SYMFONY__ENV__DATABASE_PASSWORD=...` (defaults to "~", this is the password of the database user to use)
|
- `-e SYMFONY__ENV__DATABASE_PASSWORD=...` (defaults to "~", this is the password of the database user to use)
|
||||||
|
- `-e SYMFONY__ENV__DATABASE_CHARSET=...` (defaults to utf8, this is the database charset to use)
|
||||||
- `-e SYMFONY__ENV__SECRET=...` (defaults to "ovmpmAWXRCabNlMgzlzFXDYmCFfzGv")
|
- `-e SYMFONY__ENV__SECRET=...` (defaults to "ovmpmAWXRCabNlMgzlzFXDYmCFfzGv")
|
||||||
- `-e SYMFONY__ENV__MAILER_HOST=...` defaults to "127.0.0.1", the SMTP host)
|
- `-e SYMFONY__ENV__MAILER_HOST=...` (defaults to "127.0.0.1", the SMTP host)
|
||||||
- `-e SYMFONY__ENV__MAILER_USER=...` (defaults to "~", the SMTP user)
|
- `-e SYMFONY__ENV__MAILER_USER=...` (defaults to "~", the SMTP user)
|
||||||
- `-e SYMFONY__ENV__MAILER_PASSWORD=...`(defaults to "~", the SMTP password)
|
- `-e SYMFONY__ENV__MAILER_PASSWORD=...`(defaults to "~", the SMTP password)
|
||||||
- `-e SYMFONY__ENV__FROM_EMAIL=...`(defaults to "wallabag@example.com", the address wallabag uses for outgoing emails)
|
- `-e SYMFONY__ENV__FROM_EMAIL=...`(defaults to "wallabag@example.com", the address wallabag uses for outgoing emails)
|
||||||
|
- `-e SYMFONY__ENV__FOSUSER_REGISTRATION=...`(defaults to "true", enable or disable public user registration)
|
||||||
|
- `-e SYMFONY__ENV__FOSUSER_CONFIRMATION=...`(defaults to "true", enable or disable registration confirmation)
|
||||||
|
- `-e SYMFONY__ENV__DOMAIN_NAME=...` defaults to "https://your-wallabag-url-instance.com", the URL of your wallabag instance)
|
||||||
|
- `-e SYMFONY__ENV__REDIS_SCHEME=...` (defaults to "tcp", protocol to use to communicate with the target server (tcp, unix, or http))
|
||||||
|
- `-e SYMFONY__ENV__REDIS_HOST=...` (defaults to "redis", IP or hostname of the target server)
|
||||||
|
- `-e SYMFONY__ENV__REDIS_PORT=...` (defaults to "6379", port of the target host)
|
||||||
|
- `-e SYMFONY__ENV__REDIS_PATH=...`(defaults to "~", path of the unix socket file)
|
||||||
|
- `-e SYMFONY__ENV__REDIS_PASSWORD=...` (defaults to "~", this is the password defined in the Redis server configuration)
|
||||||
|
- `-e POPULATE_DATABASE=...`(defaults to "True". Does the DB has to be populated or is it an existing one)
|
||||||
|
|
||||||
## SQLite
|
## SQLite
|
||||||
|
|
||||||
@@ -40,7 +51,7 @@ $ docker run -p 80:80 wallabag/wallabag
|
|||||||
and point your browser to `http://localhost:80`. For persistent storage you should start the container with 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
|
$ docker run -v /opt/wallabag/data:/var/www/wallabag/data -v /opt/wallabag/images:/var/www/wallabag/web/assets/images -p 80:80 wallabag/wallabag
|
||||||
```
|
```
|
||||||
|
|
||||||
## MariaDB / MySQL
|
## MariaDB / MySQL
|
||||||
@@ -49,7 +60,7 @@ For using MariaDB or MySQL you have to define some environment variables with th
|
|||||||
|
|
||||||
```
|
```
|
||||||
$ 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
|
$ 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" -e "SYMFONY__ENV__DATABASE_CHARSET=utf8mb4" -p 80:80 wallabag/wallabag
|
||||||
```
|
```
|
||||||
|
|
||||||
## PostgreSQL
|
## PostgreSQL
|
||||||
@@ -57,25 +68,37 @@ $ 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:
|
For using PostgreSQL you have to define some environment variables with the container. Example:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ 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:9.6
|
||||||
$ 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
|
$ 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_DRIVER_CLASS=Wallabag\CoreBundle\Doctrine\DBAL\Driver\CustomPostgreSQLDriver' -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
|
## Redis
|
||||||
|
|
||||||
To use redis support a linked redis container with the name `redis` is needed.
|
To use redis with a Docker link, a redis container with the name `redis` is needed and none of the `REDIS` environmental variables are needed:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ docker run -p 6379:6379 redis:alpine redis
|
$ 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
|
To use redis with an external redis host, set the appropriate environmental variables. Example:
|
||||||
|
|
||||||
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 run -p 80:80 -e "SYMFONY__ENV__REDIS_HOST=my.server.hostname" -e "SYMFONY__ENV__REDIS_PASSWORD=my-secret-pw" wallabag/wallabag
|
||||||
|
```
|
||||||
|
|
||||||
|
## Upgrading
|
||||||
|
|
||||||
|
If there is a version upgrade that needs a database migration. The most easy way to do is running the `migrate` command:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ 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
|
||||||
@@ -83,7 +106,7 @@ $ docker exec -t wallabag /var/www/wallabag/bin/console doctrine:migrations:migr
|
|||||||
It's a good way to use [docker-compose](https://docs.docker.com/compose/). Example:
|
It's a good way to use [docker-compose](https://docs.docker.com/compose/). Example:
|
||||||
|
|
||||||
```
|
```
|
||||||
version: '2'
|
version: '3'
|
||||||
services:
|
services:
|
||||||
wallabag:
|
wallabag:
|
||||||
image: wallabag/wallabag
|
image: wallabag/wallabag
|
||||||
@@ -95,18 +118,22 @@ services:
|
|||||||
- SYMFONY__ENV__DATABASE_NAME=wallabag
|
- SYMFONY__ENV__DATABASE_NAME=wallabag
|
||||||
- SYMFONY__ENV__DATABASE_USER=wallabag
|
- SYMFONY__ENV__DATABASE_USER=wallabag
|
||||||
- SYMFONY__ENV__DATABASE_PASSWORD=wallapass
|
- SYMFONY__ENV__DATABASE_PASSWORD=wallapass
|
||||||
|
- SYMFONY__ENV__DATABASE_CHARSET=utf8mb4
|
||||||
- SYMFONY__ENV__MAILER_HOST=127.0.0.1
|
- SYMFONY__ENV__MAILER_HOST=127.0.0.1
|
||||||
- SYMFONY__ENV__MAILER_USER=~
|
- SYMFONY__ENV__MAILER_USER=~
|
||||||
- SYMFONY__ENV__MAILER_PASSWORD=~
|
- SYMFONY__ENV__MAILER_PASSWORD=~
|
||||||
- SYMFONY__ENV__FROM_EMAIL=wallabag@example.com
|
- SYMFONY__ENV__FROM_EMAIL=wallabag@example.com
|
||||||
|
- SYMFONY__ENV__DOMAIN_NAME=your-wallabag-url-instance.com
|
||||||
ports:
|
ports:
|
||||||
- "80"
|
- "80"
|
||||||
|
volumes:
|
||||||
|
- /opt/wallabag/images:/var/www/wallabag/web/assets/images
|
||||||
db:
|
db:
|
||||||
image: mariadb
|
image: mariadb
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_ROOT_PASSWORD=wallaroot
|
- MYSQL_ROOT_PASSWORD=wallaroot
|
||||||
volumes:
|
volumes:
|
||||||
- /opt/wallabag:/var/lib/mysql
|
- /opt/wallabag/data:/var/lib/mysql
|
||||||
redis:
|
redis:
|
||||||
image: redis:alpine
|
image: redis:alpine
|
||||||
```
|
```
|
||||||
@@ -135,3 +162,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.
|
||||||
|
|||||||
22
root/entrypoint.sh
Normal file → Executable file
22
root/entrypoint.sh
Normal file → Executable file
@@ -1,8 +1,28 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
provisioner () {
|
||||||
|
echo "Starting provisioner..."
|
||||||
|
if ! out=`ansible-playbook -i /etc/ansible/hosts /etc/ansible/entrypoint.yml -c local "$@"`;then
|
||||||
|
echo $out;
|
||||||
|
fi
|
||||||
|
echo "Provisioner finished."
|
||||||
|
}
|
||||||
|
|
||||||
if [ "$1" = "wallabag" ];then
|
if [ "$1" = "wallabag" ];then
|
||||||
ansible-playbook -i /etc/ansible/hosts /etc/ansible/entrypoint.yml -c local
|
provisioner
|
||||||
exec s6-svscan /etc/s6/
|
exec s6-svscan /etc/s6/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$1" = "import" ];then
|
||||||
|
provisioner --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
|
||||||
|
provisioner
|
||||||
|
cd /var/www/wallabag/
|
||||||
|
exec su -c "bin/console doctrine:migrations:migrate --env=prod --no-interaction" -s /bin/sh nobody
|
||||||
|
fi
|
||||||
|
|
||||||
exec "$@"
|
exec "$@"
|
||||||
|
|||||||
@@ -4,15 +4,32 @@
|
|||||||
|
|
||||||
vars:
|
vars:
|
||||||
|
|
||||||
database_driver: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_DRIVER') }}"
|
database_driver: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_DRIVER')|default('pdo_sqlite', true) }}"
|
||||||
database_host: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_HOST') }}"
|
database_driver_class: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_DRIVER_CLASS')|default('~', true) }}"
|
||||||
database_name: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_NAME') }}"
|
database_host: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_HOST')|default('127.0.0.1', true) }}"
|
||||||
database_password: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_PASSWORD') }}"
|
database_name: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_NAME')|default('symfony', true) }}"
|
||||||
database_port: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_PORT') }}"
|
database_password: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_PASSWORD')|default('~', true) }}"
|
||||||
|
database_port: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_PORT')|default('~', true) }}"
|
||||||
database_root_password_mariadb: "{{ lookup('env', 'MYSQL_ROOT_PASSWORD') }}"
|
database_root_password_mariadb: "{{ lookup('env', 'MYSQL_ROOT_PASSWORD') }}"
|
||||||
database_root_user_postgres: "{{ lookup('env', 'POSTGRES_USER') }}"
|
database_root_user_postgres: "{{ lookup('env', 'POSTGRES_USER') }}"
|
||||||
database_root_password_postgres: "{{ lookup('env', 'POSTGRES_PASSWORD') }}"
|
database_root_password_postgres: "{{ lookup('env', 'POSTGRES_PASSWORD') }}"
|
||||||
database_user: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_USER') }}"
|
database_user: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_USER')|default('root', true) }}"
|
||||||
|
database_charset: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_CHARSET')|default('utf8', true) }}"
|
||||||
|
populate_database: "{{ lookup('env', 'POPULATE_DATABASE')|default(True, true) }}"
|
||||||
|
locale: "{{ lookup('env', 'SYMFONY__ENV__LOCALE')|default('en', true) }}"
|
||||||
|
secret: "{{ lookup('env', 'SYMFONY__ENV__SECRET')|default('ovmpmAWXRCabNlMgzlzFXDYmCFfzGv', true) }}"
|
||||||
|
mailer_host: "{{ lookup('env', 'SYMFONY__ENV__MAILER_HOST')|default('127.0.0.1', true) }}"
|
||||||
|
mailer_user: "{{ lookup('env', 'SYMFONY__ENV__MAILER_USER')|default('~', true) }}"
|
||||||
|
mailer_password: "{{ lookup('env', 'SYMFONY__ENV__MAILER_PASSWORD')|default('~', true) }}"
|
||||||
|
from_email: "{{ lookup('env', 'SYMFONY__ENV__FROM_EMAIL')|default('wallabag@example.com', true) }}"
|
||||||
|
registration: "{{ lookup('env', 'SYMFONY__ENV__FOSUSER_REGISTRATION')|default('true', true) }}"
|
||||||
|
registration_mail_confirmation: "{{ lookup('env', 'SYMFONY__ENV__FOSUSER_CONFIRMATION')|default('true', true) }}"
|
||||||
|
domain_name: "{{ lookup('env', 'SYMFONY__ENV__DOMAIN_NAME')|default('https://your-wallabag-url-instance.com', true) }}"
|
||||||
|
redis_scheme: "{{ lookup('env', 'SYMFONY__ENV__REDIS_SCHEME')|default('tcp', true) }}"
|
||||||
|
redis_host: "{{ lookup('env', 'SYMFONY__ENV__REDIS_HOST')|default('redis', true) }}"
|
||||||
|
redis_port: "{{ lookup('env', 'SYMFONY__ENV__REDIS_PORT')|default('6379', true) }}"
|
||||||
|
redis_path: "{{ lookup('env', 'SYMFONY__ENV__REDIS_PATH')|default('~', true) }}"
|
||||||
|
redis_password: "{{ lookup('env', 'SYMFONY__ENV__REDIS_PASSWORD')|default('~', true) }}"
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
@@ -27,6 +44,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:
|
||||||
@@ -61,8 +80,12 @@
|
|||||||
login_port={{ database_port }}
|
login_port={{ database_port }}
|
||||||
login_user=root
|
login_user=root
|
||||||
login_password="{{ database_root_password_mariadb }}"
|
login_password="{{ database_root_password_mariadb }}"
|
||||||
|
encoding="utf8mb4"
|
||||||
notify: run install
|
notify: run install
|
||||||
when: database_driver == 'pdo_mysql'
|
when: (database_driver == 'pdo_mysql') and
|
||||||
|
(populate_database == True)
|
||||||
|
tags:
|
||||||
|
- firstrun
|
||||||
|
|
||||||
- name: add mariadb user
|
- name: add mariadb user
|
||||||
mysql_user:
|
mysql_user:
|
||||||
@@ -76,7 +99,10 @@
|
|||||||
login_password="{{ database_root_password_mariadb }}"
|
login_password="{{ database_root_password_mariadb }}"
|
||||||
state=present
|
state=present
|
||||||
when: (database_driver == 'pdo_mysql') and
|
when: (database_driver == 'pdo_mysql') and
|
||||||
(database_user != 'root')
|
(database_user != 'root') and
|
||||||
|
(populate_database == True)
|
||||||
|
tags:
|
||||||
|
- firstrun
|
||||||
|
|
||||||
- name: postgresql db
|
- name: postgresql db
|
||||||
postgresql_db:
|
postgresql_db:
|
||||||
@@ -87,12 +113,16 @@
|
|||||||
login_user="{{ database_root_user_postgres }}"
|
login_user="{{ database_root_user_postgres }}"
|
||||||
login_password="{{ database_root_password_postgres }}"
|
login_password="{{ database_root_password_postgres }}"
|
||||||
notify: run install
|
notify: run install
|
||||||
when: database_driver == 'pdo_pgsql'
|
when: (database_driver == 'pdo_pgsql') and
|
||||||
|
(populate_database == True)
|
||||||
|
tags:
|
||||||
|
- firstrun
|
||||||
|
|
||||||
- name: add postgresql user
|
- name: add postgresql user
|
||||||
postgresql_user:
|
postgresql_user:
|
||||||
name="{{ database_user }}"
|
name="{{ database_user }}"
|
||||||
password="{{ database_password }}"
|
password="{{ database_password }}"
|
||||||
|
encrypted=true
|
||||||
db={{ database_name }}
|
db={{ database_name }}
|
||||||
priv=ALL
|
priv=ALL
|
||||||
login_host="{{ database_host }}"
|
login_host="{{ database_host }}"
|
||||||
@@ -101,7 +131,10 @@
|
|||||||
login_password="{{ database_root_password_postgres }}"
|
login_password="{{ database_root_password_postgres }}"
|
||||||
state=present
|
state=present
|
||||||
when: (database_driver == 'pdo_pgsql') and
|
when: (database_driver == 'pdo_pgsql') and
|
||||||
(database_user != 'postgres')
|
(database_user != 'postgres') and
|
||||||
|
(populate_database == True)
|
||||||
|
tags:
|
||||||
|
- firstrun
|
||||||
|
|
||||||
- name: remove cache
|
- name: remove cache
|
||||||
file:
|
file:
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
parameters:
|
parameters:
|
||||||
database_driver: {{ database_driver }}
|
database_driver: {{ database_driver }}
|
||||||
|
database_driver_class: {{ database_driver_class }}
|
||||||
database_host: {{ database_host }}
|
database_host: {{ database_host }}
|
||||||
database_port: {{ database_port }}
|
database_port: {{ database_port }}
|
||||||
database_name: {{ database_name }}
|
database_name: {{ database_name }}
|
||||||
@@ -7,26 +8,30 @@ parameters:
|
|||||||
database_password: {{ database_password }}
|
database_password: {{ database_password }}
|
||||||
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_charset: {{ database_charset }}
|
||||||
|
|
||||||
|
domain_name: {{ domain_name }}
|
||||||
|
|
||||||
mailer_transport: smtp
|
mailer_transport: smtp
|
||||||
mailer_host: 127.0.0.1
|
mailer_host: {{ mailer_host }}
|
||||||
mailer_user: ~
|
mailer_user: {{ mailer_user }}
|
||||||
mailer_password: ~
|
mailer_password: {{ mailer_password }}
|
||||||
|
|
||||||
locale: en
|
locale: {{ locale }}
|
||||||
|
|
||||||
# A secret key that's used to generate certain security-related tokens
|
# A secret key that's used to generate certain security-related tokens
|
||||||
secret: ovmpmAWXRCabNlMgzlzFXDYmCFfzGv
|
secret: {{ secret }}
|
||||||
|
|
||||||
# two factor stuff
|
# two factor stuff
|
||||||
twofactor_auth: true
|
twofactor_auth: true
|
||||||
twofactor_sender: no-reply@wallabag.org
|
twofactor_sender: no-reply@wallabag.org
|
||||||
|
|
||||||
# fosuser stuff
|
# fosuser stuff
|
||||||
fosuser_registration: true
|
fosuser_registration: {{ registration }}
|
||||||
fosuser_confirmation: true
|
fosuser_confirmation: {{ registration_mail_confirmation }}
|
||||||
|
|
||||||
from_email: no-reply@wallabag.org
|
from_email: {{ from_email }}
|
||||||
|
|
||||||
rss_limit: 50
|
rss_limit: 50
|
||||||
|
|
||||||
@@ -35,7 +40,11 @@ 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_host: redis
|
redis_scheme: {{ redis_scheme }}
|
||||||
redis_port: 6379
|
redis_host: {{ redis_host }}
|
||||||
|
redis_port: {{ redis_port }}
|
||||||
|
redis_path: {{ redis_path }}
|
||||||
|
redis_password: {{ redis_password }}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ http {
|
|||||||
gzip on;
|
gzip on;
|
||||||
gzip_disable "msie6";
|
gzip_disable "msie6";
|
||||||
open_file_cache max=100;
|
open_file_cache max=100;
|
||||||
client_max_body_size 50M;
|
client_max_body_size 100M;
|
||||||
|
|
||||||
|
|
||||||
upstream php-upstream {
|
upstream php-upstream {
|
||||||
|
|||||||
@@ -268,7 +268,7 @@ output_buffering = 4096
|
|||||||
; Note: You need to use zlib.output_handler instead of the standard
|
; Note: You need to use zlib.output_handler instead of the standard
|
||||||
; output_handler, or otherwise the output will be corrupted.
|
; output_handler, or otherwise the output will be corrupted.
|
||||||
; http://php.net/zlib.output-compression
|
; http://php.net/zlib.output-compression
|
||||||
zlib.output_compression = Off
|
zlib.output_compression = On
|
||||||
|
|
||||||
; http://php.net/zlib.output-compression-level
|
; http://php.net/zlib.output-compression-level
|
||||||
;zlib.output_compression_level = -1
|
;zlib.output_compression_level = -1
|
||||||
@@ -670,7 +670,7 @@ auto_globals_jit = On
|
|||||||
; Its value may be 0 to disable the limit. It is ignored if POST data reading
|
; Its value may be 0 to disable the limit. It is ignored if POST data reading
|
||||||
; is disabled through enable_post_data_reading.
|
; is disabled through enable_post_data_reading.
|
||||||
; http://php.net/post-max-size
|
; http://php.net/post-max-size
|
||||||
post_max_size = 20G
|
post_max_size = 100M
|
||||||
|
|
||||||
; Automatically add files before PHP document.
|
; Automatically add files before PHP document.
|
||||||
; http://php.net/auto-prepend-file
|
; http://php.net/auto-prepend-file
|
||||||
@@ -802,7 +802,7 @@ upload_tmp_dir = /tmp/
|
|||||||
|
|
||||||
; Maximum allowed size for uploaded files.
|
; Maximum allowed size for uploaded files.
|
||||||
; http://php.net/upload-max-filesize
|
; http://php.net/upload-max-filesize
|
||||||
upload_max_filesize = 20G
|
upload_max_filesize = 100M
|
||||||
|
|
||||||
; Maximum number of files that can be uploaded via a single request
|
; Maximum number of files that can be uploaded via a single request
|
||||||
max_file_uploads = 20
|
max_file_uploads = 20
|
||||||
2
root/etc/s6/.s6-svscan/finish
Executable file
2
root/etc/s6/.s6-svscan/finish
Executable file
@@ -0,0 +1,2 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
exec /bin/true
|
||||||
@@ -1,12 +1,17 @@
|
|||||||
parameters:
|
parameters:
|
||||||
database_driver: %env.database_driver%
|
database_driver: pdo_sqlite
|
||||||
database_host: %env.database_host%
|
database_host: 127.0.0.1
|
||||||
database_port: %env.database_port%
|
database_port: ~
|
||||||
database_name: %env.database_name%
|
database_name: symfony
|
||||||
database_user: %env.database_user%
|
database_user: root
|
||||||
database_password: %env.database_password%
|
database_password: ~
|
||||||
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_charset: utf8
|
||||||
|
database_driver_class: null
|
||||||
|
|
||||||
|
domain_name: https://your-wallabag-url-instance.com
|
||||||
|
|
||||||
test_database_driver: pdo_sqlite
|
test_database_driver: pdo_sqlite
|
||||||
test_database_host: 127.0.0.1
|
test_database_host: 127.0.0.1
|
||||||
@@ -43,7 +48,11 @@ 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_host: localhost
|
redis_host: localhost
|
||||||
redis_port: 6379
|
redis_port: 6379
|
||||||
|
redis_path: null
|
||||||
|
redis_password: null
|
||||||
|
|||||||
9
tests/docker-compose.default.yml
Normal file
9
tests/docker-compose.default.yml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
version: '2'
|
||||||
|
services:
|
||||||
|
wallabag:
|
||||||
|
build:
|
||||||
|
context: ../
|
||||||
|
image: wallabag:default
|
||||||
|
container_name: wallabag
|
||||||
|
ports:
|
||||||
|
- "127.0.0.1:80:80"
|
||||||
@@ -18,5 +18,6 @@ services:
|
|||||||
- "127.0.0.1:80:80"
|
- "127.0.0.1:80:80"
|
||||||
db:
|
db:
|
||||||
image: mariadb
|
image: mariadb
|
||||||
|
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --character-set-client-handshake=FALSE
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_ROOT_PASSWORD=wallaroot
|
- MYSQL_ROOT_PASSWORD=wallaroot
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ services:
|
|||||||
- POSTGRES_USER=my-super-user
|
- POSTGRES_USER=my-super-user
|
||||||
- SYMFONY__ENV__SECRET=F00B4R
|
- SYMFONY__ENV__SECRET=F00B4R
|
||||||
- SYMFONY__ENV__DATABASE_DRIVER=pdo_pgsql
|
- SYMFONY__ENV__DATABASE_DRIVER=pdo_pgsql
|
||||||
|
- SYMFONY__ENV__DATABASE_DRIVER_CLASS=Wallabag\CoreBundle\Doctrine\DBAL\Driver\CustomPostgreSQLDriver
|
||||||
- SYMFONY__ENV__DATABASE_HOST=db
|
- SYMFONY__ENV__DATABASE_HOST=db
|
||||||
- SYMFONY__ENV__DATABASE_PORT=5432
|
- SYMFONY__ENV__DATABASE_PORT=5432
|
||||||
- SYMFONY__ENV__DATABASE_NAME=wallabag
|
- SYMFONY__ENV__DATABASE_NAME=wallabag
|
||||||
@@ -18,7 +19,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:80:80"
|
- "127.0.0.1:80:80"
|
||||||
db:
|
db:
|
||||||
image: postgres
|
image: postgres:10.3
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_PASSWORD=my-secret-pw
|
- POSTGRES_PASSWORD=my-secret-pw
|
||||||
- POSTGRES_USER=my-super-user
|
- POSTGRES_USER=my-super-user
|
||||||
|
|||||||
Reference in New Issue
Block a user