mirror of
https://github.com/wallabag/docker
synced 2025-12-13 17:56:31 +00:00
Compare commits
27 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dd280bd5cf | ||
|
|
e292a1c0c2 | ||
|
|
7cce137040 | ||
|
|
ad326dcfe3 | ||
|
|
71dd17939c | ||
|
|
66c3967ef5 | ||
|
|
6d7fdd92c8 | ||
|
|
f9f5b5c68c | ||
|
|
386924f2cc | ||
|
|
3d3f11fb85 | ||
|
|
25bf47149f | ||
|
|
0cee0470de | ||
|
|
b626873351 | ||
|
|
e741136827 | ||
|
|
b92f4c2740 | ||
|
|
040655c3c4 | ||
|
|
5f78ae9a21 | ||
|
|
e510f9db1b | ||
|
|
926e8c7445 | ||
|
|
7d7b1a846f | ||
|
|
8fd1421d36 | ||
|
|
f86d945624 | ||
|
|
a37317f55f | ||
|
|
eeead4ff44 | ||
|
|
16a1a1236a | ||
|
|
2460f55662 | ||
|
|
de684f5a44 |
@@ -1,8 +1,8 @@
|
||||
FROM alpine:edge
|
||||
FROM alpine:latest
|
||||
|
||||
LABEL maintainer "Marvin Steadfast <marvin@xsteadfastx.org>"
|
||||
|
||||
ARG WALLABAG_VERSION=2.3.2
|
||||
ARG WALLABAG_VERSION=2.3.6
|
||||
|
||||
RUN set -ex \
|
||||
&& apk update \
|
||||
@@ -37,6 +37,9 @@ RUN set -ex \
|
||||
php7-tokenizer \
|
||||
php7-xml \
|
||||
php7-zlib \
|
||||
php7-sockets \
|
||||
php7-xmlreader \
|
||||
php7-tidy \
|
||||
py-mysqldb \
|
||||
py-psycopg2 \
|
||||
py-simplejson \
|
||||
|
||||
25
README.md
25
README.md
@@ -18,19 +18,26 @@ 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_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_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_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_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_CHARSET=...` (defaults to utf8, this is the database charset to use)
|
||||
- `-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_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__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
|
||||
@@ -44,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:
|
||||
|
||||
```
|
||||
$ 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
|
||||
$ 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
|
||||
@@ -53,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 --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
|
||||
@@ -62,18 +69,24 @@ For using PostgreSQL you have to define some environment variables with the cont
|
||||
|
||||
```
|
||||
$ 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
|
||||
|
||||
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 --name redis redis:alpine
|
||||
$ docker run -p 80:80 --link redis:redis wallabag/wallabag
|
||||
```
|
||||
|
||||
To use redis with an external redis host, set the appropriate environmental variables. Example:
|
||||
|
||||
```
|
||||
$ 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:
|
||||
@@ -105,10 +118,12 @@ services:
|
||||
- SYMFONY__ENV__DATABASE_NAME=wallabag
|
||||
- SYMFONY__ENV__DATABASE_USER=wallabag
|
||||
- SYMFONY__ENV__DATABASE_PASSWORD=wallapass
|
||||
- SYMFONY__ENV__DATABASE_CHARSET=utf8mb4
|
||||
- SYMFONY__ENV__MAILER_HOST=127.0.0.1
|
||||
- SYMFONY__ENV__MAILER_USER=~
|
||||
- SYMFONY__ENV__MAILER_PASSWORD=~
|
||||
- SYMFONY__ENV__FROM_EMAIL=wallabag@example.com
|
||||
- SYMFONY__ENV__DOMAIN_NAME=your-wallabag-url-instance.com
|
||||
ports:
|
||||
- "80"
|
||||
volumes:
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
vars:
|
||||
|
||||
database_driver: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_DRIVER')|default('pdo_sqlite', true) }}"
|
||||
database_driver_class: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_DRIVER_CLASS')|default('~', true) }}"
|
||||
database_host: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_HOST')|default('127.0.0.1', true) }}"
|
||||
database_name: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_NAME')|default('symfony', true) }}"
|
||||
database_password: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_PASSWORD')|default('~', true) }}"
|
||||
@@ -24,6 +25,11 @@
|
||||
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:
|
||||
|
||||
@@ -116,6 +122,7 @@
|
||||
postgresql_user:
|
||||
name="{{ database_user }}"
|
||||
password="{{ database_password }}"
|
||||
encrypted=true
|
||||
db={{ database_name }}
|
||||
priv=ALL
|
||||
login_host="{{ database_host }}"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
parameters:
|
||||
database_driver: {{ database_driver }}
|
||||
database_driver_class: {{ database_driver_class }}
|
||||
database_host: {{ database_host }}
|
||||
database_port: {{ database_port }}
|
||||
database_name: {{ database_name }}
|
||||
@@ -9,7 +10,6 @@ parameters:
|
||||
database_table_prefix: wallabag_
|
||||
database_socket: null
|
||||
database_charset: {{ database_charset }}
|
||||
database_driver_class: null
|
||||
|
||||
domain_name: {{ domain_name }}
|
||||
|
||||
@@ -43,8 +43,8 @@ parameters:
|
||||
rabbitmq_prefetch_count: 10
|
||||
|
||||
# Redis processing
|
||||
redis_scheme: tcp
|
||||
redis_host: redis
|
||||
redis_port: 6379
|
||||
redis_path: null
|
||||
redis_password: null
|
||||
redis_scheme: {{ redis_scheme }}
|
||||
redis_host: {{ redis_host }}
|
||||
redis_port: {{ redis_port }}
|
||||
redis_path: {{ redis_path }}
|
||||
redis_password: {{ redis_password }}
|
||||
|
||||
@@ -18,5 +18,6 @@ services:
|
||||
- "127.0.0.1:80:80"
|
||||
db:
|
||||
image: mariadb
|
||||
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --character-set-client-handshake=FALSE
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=wallaroot
|
||||
|
||||
@@ -10,6 +10,7 @@ services:
|
||||
- POSTGRES_USER=my-super-user
|
||||
- SYMFONY__ENV__SECRET=F00B4R
|
||||
- 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_PORT=5432
|
||||
- SYMFONY__ENV__DATABASE_NAME=wallabag
|
||||
@@ -18,7 +19,7 @@ services:
|
||||
ports:
|
||||
- "127.0.0.1:80:80"
|
||||
db:
|
||||
image: postgres:9.6
|
||||
image: postgres:10.3
|
||||
environment:
|
||||
- POSTGRES_PASSWORD=my-secret-pw
|
||||
- POSTGRES_USER=my-super-user
|
||||
|
||||
Reference in New Issue
Block a user