1
0
mirror of https://github.com/wallabag/docker synced 2025-12-13 17:56:31 +00:00

17 Commits
2.0.1 ... 2.0.7

Author SHA1 Message Date
Marvin Steadfast
b165d3c14f Update Dockerfile for 2.0.7 release 2016-08-23 09:34:30 +02:00
Nicolas Lœuillet
8ce69e0d48 Merge pull request #13 from nsteinmetz/patch-1
Update Dockerfile for 2.0.6 release
2016-08-10 17:57:56 +02:00
Nicolas Steinmetz
3c96d9d6d9 Update Dockerfile for 2.0.6 release 2016-08-10 17:55:39 +02:00
xsteadfastx
fdffa0f9ec Merge pull request #11 from sheeprine/fix/body_size_limit
Increase max body size from nginx
2016-07-21 13:56:48 +02:00
Stéphane Albert
6a67881572 Increase max body size from nginx
With the default client_max_body_size (1M), import cannot be used.
Raise the limit to 50M.
2016-07-21 13:38:03 +02:00
xsteadfastx
038bef09cd Merge pull request #10 from davidmehren/master
Make email settings configurable
2016-06-13 09:27:43 +02:00
David Mehren
26b75eee75 made email server settings configurable 2016-06-11 15:43:04 +02:00
Marvin Steadfast
025c51422e new version 2.0.4 2016-06-01 09:42:10 +02:00
Marvin Steadfast
5f6a948f98 new version 2.0.4 2016-05-08 12:08:42 +02:00
Marvin Steadfast
06af340123 Added Postgres support
Now its possible to use a Postgres container as database backend.
2016-04-25 12:33:57 +02:00
Jeremy Benoist
4cd689a11c Merge pull request #5 from iMelnik/patch-1
Fix logs naming
2016-04-24 21:14:46 +02:00
Sergey Melnik
6e006e4730 Fix logs naming
Errors to error.log and access to access.log
2016-04-24 22:13:25 +03:00
xsteadfastx
d42538d365 Merge pull request #4 from wallabag/docker-wllbg-203
Prepare 2.0.3
2016-04-22 18:32:31 +02:00
Nicolas Lœuillet
5ef93a5396 Prepare 2.0.3 2016-04-22 18:17:23 +02:00
Marvin Steadfast
7b46fdd314 Fixed bug with entrypoint
The entrypoint didnt triggered the install script if there is no
sqlitedb.
2016-04-22 14:20:04 +02:00
Marvin Steadfast
052f98f7ba new version 2.0.2 2016-04-21 15:53:01 +02:00
Marvin Steadfast
21c4819511 fixed typo 2016-04-21 15:50:09 +02:00
5 changed files with 75 additions and 21 deletions

View File

@@ -1,14 +1,19 @@
FROM alpine:edge
MAINTAINER Marvin Steadfast <marvin@xsteadfastx.org>
ENV WALLABAG_VERSION=2.0.1 \
ENV WALLABAG_VERSION=2.0.7 \
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=~ \
SYMFONY__ENV__SECRET=ovmpmAWXRCabNlMgzlzFXDYmCFfzGv
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
RUN echo "@testing http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
&& apk add --update \
@@ -31,12 +36,14 @@ RUN echo "@testing http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/
php7-mbstring@testing \
php7-openssl@testing \
php7-pdo_mysql@testing \
php7-pdo_pgsql@testing \
php7-pdo_sqlite@testing \
php7-phar@testing \
php7-session@testing \
php7-xml@testing \
php7@testing\
py-mysqldb \
py-psycopg2 \
py-simplejson \
s6 \
&& rm -rf /var/cache/apk/*

View File

@@ -11,6 +11,7 @@ Default login is `wallabag:wallabag`.
## Environment variables
- `-e MYSQL_ROOT_PASSWORD=...` (needed for the mariadb container to initialise and for the entrypoint in the wallabag container to create a database and user if its 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 SYMFONY__ENV__DATABASE_DRIVER=...` (defaults to "pdo_sqlite", this sets the database driver 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)
@@ -18,7 +19,10 @@ Default login is `wallabag:wallabag`.
- `-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__SECRET=...` (defaults to "ovmpmAWXRCabNlMgzlzFXDYmCFfzGv")
- `-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)
## sqlite
The easiest way to start wallabag is to use the sqlite backend. You can spin that up with
@@ -39,19 +43,27 @@ For using mariadb or mysql you have to define some environment variables with th
```
$ docker run 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 xsteadfastx/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" -p 80:80 wallabag/wallabag
```
## postgresql
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" -d postgres
$ docker run --name wallabag --link wallabag-db:wallabag-db -e "POSTGRES_PASSWORD=my-secret-pw" -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-compose
Its 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'
services:
wallabag:
build:
context: wallabag/
image: wallabag/wallabag
environment:
- MYSQL_ROOT_PASSWORD=wallaroot
- SYMFONY__ENV__DATABASE_DRIVER=pdo_mysql
@@ -60,6 +72,10 @@ services:
- SYMFONY__ENV__DATABASE_NAME=wallabag
- SYMFONY__ENV__DATABASE_USER=wallabag
- SYMFONY__ENV__DATABASE_PASSWORD=wallapass
- SYMFONY__ENV__MAILER_HOST=127.0.0.1
- SYMFONY__ENV__MAILER_USER=~
- SYMFONY__ENV__MAILER_PASSWORD=~
- SYMFONY__ENV__FROM_EMAIL=wallabag@example.com
ports:
- "80"
db:
@@ -69,6 +85,7 @@ services:
volumes:
- /opt/wallabag:/var/lib/mysql
```
Note that you must fill out the mail related variables according to your mail config.
## nginx

View File

@@ -9,7 +9,8 @@
database_name: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_NAME') }}"
database_password: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_PASSWORD') }}"
database_port: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_PORT') }}"
database_root_password: "{{ lookup('env', 'MYSQL_ROOT_PASSWORD') }}"
database_root_password_mariadb: "{{ lookup('env', 'MYSQL_ROOT_PASSWORD') }}"
database_root_password_postgres: "{{ lookup('env', 'POSTGRES_PASSWORD') }}"
database_user: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_USER') }}"
tasks:
@@ -31,6 +32,7 @@
- name: notify install for sqlite
debug:
msg='notify installation script if sqlite db does not exist'
changed_when: true
notify: run install
when: (database_driver == 'pdo_sqlite') and
(wallabag_sqlite_db.stat.exists == False)
@@ -38,16 +40,18 @@
- name: wait for db container
wait_for:
host="{{ database_host }}"
port=3306
when: database_driver == 'pdo_mysql'
port="{{ database_port }}"
when: (database_driver == 'pdo_mysql') or
(database_driver == 'pdo_pgsql')
- name: mariadb db
- name: add mariadb db
mysql_db:
name="{{ database_name }}"
state=present
login_host="{{ database_host }}"
login_port={{ database_port }}
login_user=root
login_password="{{ database_root_password }}"
login_password="{{ database_root_password_mariadb }}"
notify: run install
when: database_driver == 'pdo_mysql'
@@ -58,13 +62,38 @@
password="{{ database_password }}"
priv={{ database_name }}.*:ALL
login_host="{{ database_host }}"
login_port="{{ database_port }}"
login_port={{ database_port }}
login_user=root
login_password="{{ database_root_password }}"
login_password="{{ database_root_password_mariadb }}"
state=present
when: (database_driver == 'pdo_mysql') and
(database_user != 'root')
- name: postgresql db
postgresql_db:
name="{{ database_name }}"
state=present
login_host="{{ database_host }}"
port={{ database_port }}
login_user=postgres
login_password="{{ database_root_password_postgres }}"
notify: run install
when: database_driver == 'pdo_pgsql'
- name: add postgresql user
postgresql_user:
name="{{ database_user }}"
password="{{ database_password }}"
db={{ database_name }}
priv=ALL
login_host="{{ database_host }}"
port={{ database_port }}
login_user=postgres
login_password="{{ database_root_password_postgres }}"
state=present
when: (database_driver == 'pdo_pgsql') and
(database_user != 'postgres')
- name: remove cache
file:
path=/var/www/wallabag/var/cache

View File

@@ -23,6 +23,7 @@ http {
gzip on;
gzip_disable "msie6";
open_file_cache max=100;
client_max_body_size 50M;
upstream php-upstream {
@@ -57,8 +58,8 @@ http {
internal;
}
error_log /var/log/nginx/access.log;
access_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
}
}

View File

@@ -17,9 +17,9 @@ parameters:
test_database_path: "%kernel.root_dir%/../data/db/wallabag_test.sqlite"
mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_user: ~
mailer_password: ~
mailer_host: %env.mailer_host%
mailer_user: %env.mailer_user%
mailer_password: %env.mailer_password%
locale: en
@@ -28,9 +28,9 @@ parameters:
# two factor stuff
twofactor_auth: true
twofactor_sender: no-reply@wallabag.org
twofactor_sender: %env.from_email%
# fosuser stuff
fosuser_confirmation: true
from_email: no-reply@wallabag.org
from_email: %env.from_email%