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

14 Commits
2.0.2 ... 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
5 changed files with 73 additions and 20 deletions

View File

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

View File

@@ -11,6 +11,7 @@ Default login is `wallabag:wallabag`.
## Environment variables ## 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 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_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_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)
@@ -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_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__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_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 ## sqlite
The easiest way to start wallabag is to use the sqlite backend. You can spin that up with The easiest way to start wallabag is to use the sqlite backend. You can spin that up with
@@ -39,7 +43,16 @@ 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 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 ## docker-compose
@@ -50,8 +63,7 @@ It's a good way to use [docker-compose](https://docs.docker.com/compose/). Examp
version: '2' version: '2'
services: services:
wallabag: wallabag:
build: image: wallabag/wallabag
context: wallabag/
environment: environment:
- MYSQL_ROOT_PASSWORD=wallaroot - MYSQL_ROOT_PASSWORD=wallaroot
- SYMFONY__ENV__DATABASE_DRIVER=pdo_mysql - SYMFONY__ENV__DATABASE_DRIVER=pdo_mysql
@@ -60,6 +72,10 @@ 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__MAILER_HOST=127.0.0.1
- SYMFONY__ENV__MAILER_USER=~
- SYMFONY__ENV__MAILER_PASSWORD=~
- SYMFONY__ENV__FROM_EMAIL=wallabag@example.com
ports: ports:
- "80" - "80"
db: db:
@@ -69,6 +85,7 @@ services:
volumes: volumes:
- /opt/wallabag:/var/lib/mysql - /opt/wallabag:/var/lib/mysql
``` ```
Note that you must fill out the mail related variables according to your mail config.
## nginx ## nginx

View File

@@ -9,7 +9,8 @@
database_name: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_NAME') }}" database_name: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_NAME') }}"
database_password: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_PASSWORD') }}" database_password: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_PASSWORD') }}"
database_port: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_PORT') }}" 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') }}" database_user: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_USER') }}"
tasks: tasks:
@@ -39,16 +40,18 @@
- name: wait for db container - name: wait for db container
wait_for: wait_for:
host="{{ database_host }}" host="{{ database_host }}"
port=3306 port="{{ database_port }}"
when: database_driver == 'pdo_mysql' when: (database_driver == 'pdo_mysql') or
(database_driver == 'pdo_pgsql')
- name: mariadb db - name: add mariadb db
mysql_db: mysql_db:
name="{{ database_name }}" name="{{ database_name }}"
state=present state=present
login_host="{{ database_host }}" login_host="{{ database_host }}"
login_port={{ database_port }}
login_user=root login_user=root
login_password="{{ database_root_password }}" login_password="{{ database_root_password_mariadb }}"
notify: run install notify: run install
when: database_driver == 'pdo_mysql' when: database_driver == 'pdo_mysql'
@@ -59,13 +62,38 @@
password="{{ database_password }}" password="{{ database_password }}"
priv={{ database_name }}.*:ALL priv={{ database_name }}.*:ALL
login_host="{{ database_host }}" login_host="{{ database_host }}"
login_port="{{ database_port }}" login_port={{ database_port }}
login_user=root login_user=root
login_password="{{ database_root_password }}" 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')
- 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 - name: remove cache
file: file:
path=/var/www/wallabag/var/cache path=/var/www/wallabag/var/cache

View File

@@ -23,6 +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;
upstream php-upstream { upstream php-upstream {
@@ -57,8 +58,8 @@ http {
internal; internal;
} }
error_log /var/log/nginx/access.log; access_log /var/log/nginx/access.log;
access_log /var/log/nginx/error.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" test_database_path: "%kernel.root_dir%/../data/db/wallabag_test.sqlite"
mailer_transport: smtp mailer_transport: smtp
mailer_host: 127.0.0.1 mailer_host: %env.mailer_host%
mailer_user: ~ mailer_user: %env.mailer_user%
mailer_password: ~ mailer_password: %env.mailer_password%
locale: en locale: en
@@ -28,9 +28,9 @@ parameters:
# two factor stuff # two factor stuff
twofactor_auth: true twofactor_auth: true
twofactor_sender: no-reply@wallabag.org twofactor_sender: %env.from_email%
# fosuser stuff # fosuser stuff
fosuser_confirmation: true fosuser_confirmation: true
from_email: no-reply@wallabag.org from_email: %env.from_email%