mirror of
https://github.com/wallabag/docker
synced 2025-12-13 09:46:27 +00:00
Compare commits
27 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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
|
||||
|
||||
env:
|
||||
- DB_TYPE=default
|
||||
- DB_TYPE=sqlite
|
||||
- DB_TYPE=mariadb
|
||||
- DB_TYPE=postgresql
|
||||
|
||||
19
Dockerfile
19
Dockerfile
@@ -1,20 +1,8 @@
|
||||
FROM alpine:edge
|
||||
MAINTAINER Marvin Steadfast <marvin@xsteadfastx.org>
|
||||
|
||||
ENV WALLABAG_VERSION=2.1.1 \
|
||||
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
|
||||
|
||||
ENV WALLABAG_VERSION=2.1.6 \
|
||||
POSTGRES_USER=postgres
|
||||
|
||||
RUN echo "@testing http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
|
||||
&& apk add --update \
|
||||
@@ -44,6 +32,7 @@ RUN echo "@testing http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/
|
||||
php7-phar@testing \
|
||||
php7-session@testing \
|
||||
php7-xml@testing \
|
||||
php7-zlib@testing \
|
||||
php7@testing\
|
||||
py-mysqldb \
|
||||
py-psycopg2 \
|
||||
@@ -68,8 +57,6 @@ RUN cd /var/www/wallabag \
|
||||
|
||||
RUN chown -R nobody:nobody /var/www/wallabag
|
||||
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
EXPOSE 80
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
CMD ["wallabag"]
|
||||
|
||||
@@ -28,6 +28,8 @@ Default login is `wallabag:wallabag`.
|
||||
- `-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 POPULATE_DATABASE=...`(defaults to "True". Does the DB has to be populated or is it an existing one)
|
||||
|
||||
## SQLite
|
||||
|
||||
@@ -66,7 +68,7 @@ $ docker run --name wallabag --link wallabag-db:wallabag-db -e "POSTGRES_PASSWOR
|
||||
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 6379:6379 --name redis redis:alpine
|
||||
$ docker run -p 80:80 --link redis:redis wallabag/wallabag
|
||||
```
|
||||
|
||||
|
||||
0
root/entrypoint.sh
Normal file → Executable file
0
root/entrypoint.sh
Normal file → Executable file
@@ -4,15 +4,22 @@
|
||||
|
||||
vars:
|
||||
|
||||
database_driver: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_DRIVER') }}"
|
||||
database_host: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_HOST') }}"
|
||||
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_driver: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_DRIVER')|default('pdo_sqlite', 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) }}"
|
||||
database_port: "{{ lookup('env', 'SYMFONY__ENV__DATABASE_PORT')|default('~', true) }}"
|
||||
database_root_password_mariadb: "{{ lookup('env', 'MYSQL_ROOT_PASSWORD') }}"
|
||||
database_root_user_postgres: "{{ lookup('env', 'POSTGRES_USER') }}"
|
||||
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) }}"
|
||||
populate_database: "{{ lookup('env', 'POPULATE_DATABASE')|default(True, 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) }}"
|
||||
|
||||
tasks:
|
||||
|
||||
@@ -62,7 +69,8 @@
|
||||
login_user=root
|
||||
login_password="{{ database_root_password_mariadb }}"
|
||||
notify: run install
|
||||
when: database_driver == 'pdo_mysql'
|
||||
when: (database_driver == 'pdo_mysql') and
|
||||
(populate_database == True)
|
||||
|
||||
- name: add mariadb user
|
||||
mysql_user:
|
||||
@@ -76,7 +84,8 @@
|
||||
login_password="{{ database_root_password_mariadb }}"
|
||||
state=present
|
||||
when: (database_driver == 'pdo_mysql') and
|
||||
(database_user != 'root')
|
||||
(database_user != 'root') and
|
||||
(populate_database == True)
|
||||
|
||||
- name: postgresql db
|
||||
postgresql_db:
|
||||
@@ -87,7 +96,8 @@
|
||||
login_user="{{ database_root_user_postgres }}"
|
||||
login_password="{{ database_root_password_postgres }}"
|
||||
notify: run install
|
||||
when: database_driver == 'pdo_pgsql'
|
||||
when: (database_driver == 'pdo_pgsql') and
|
||||
(populate_database == True)
|
||||
|
||||
- name: add postgresql user
|
||||
postgresql_user:
|
||||
@@ -101,7 +111,8 @@
|
||||
login_password="{{ database_root_password_postgres }}"
|
||||
state=present
|
||||
when: (database_driver == 'pdo_pgsql') and
|
||||
(database_user != 'postgres')
|
||||
(database_user != 'postgres') and
|
||||
(populate_database == True)
|
||||
|
||||
- name: remove cache
|
||||
file:
|
||||
|
||||
@@ -7,26 +7,27 @@ parameters:
|
||||
database_password: {{ database_password }}
|
||||
database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite"
|
||||
database_table_prefix: wallabag_
|
||||
database_socket: null
|
||||
|
||||
mailer_transport: smtp
|
||||
mailer_host: 127.0.0.1
|
||||
mailer_user: ~
|
||||
mailer_password: ~
|
||||
mailer_host: {{ mailer_host }}
|
||||
mailer_user: {{ mailer_user }}
|
||||
mailer_password: {{ mailer_password }}
|
||||
|
||||
locale: en
|
||||
|
||||
# A secret key that's used to generate certain security-related tokens
|
||||
secret: ovmpmAWXRCabNlMgzlzFXDYmCFfzGv
|
||||
secret: {{ secret }}
|
||||
|
||||
# two factor stuff
|
||||
twofactor_auth: true
|
||||
twofactor_sender: no-reply@wallabag.org
|
||||
|
||||
# fosuser stuff
|
||||
fosuser_registration: true
|
||||
fosuser_registration: {{ registration }}
|
||||
fosuser_confirmation: true
|
||||
|
||||
from_email: no-reply@wallabag.org
|
||||
from_email: {{ from_email }}
|
||||
|
||||
rss_limit: 50
|
||||
|
||||
@@ -37,5 +38,7 @@ parameters:
|
||||
rabbitmq_password: guest
|
||||
|
||||
# Redis processing
|
||||
redis_scheme: tcp
|
||||
redis_host: redis
|
||||
redis_port: 6379
|
||||
redis_path: null
|
||||
|
||||
@@ -23,7 +23,7 @@ http {
|
||||
gzip on;
|
||||
gzip_disable "msie6";
|
||||
open_file_cache max=100;
|
||||
client_max_body_size 50M;
|
||||
client_max_body_size 100M;
|
||||
|
||||
|
||||
upstream php-upstream {
|
||||
|
||||
@@ -268,7 +268,7 @@ output_buffering = 4096
|
||||
; Note: You need to use zlib.output_handler instead of the standard
|
||||
; output_handler, or otherwise the output will be corrupted.
|
||||
; http://php.net/zlib.output-compression
|
||||
zlib.output_compression = Off
|
||||
zlib.output_compression = On
|
||||
|
||||
; http://php.net/zlib.output-compression-level
|
||||
;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
|
||||
; is disabled through enable_post_data_reading.
|
||||
; http://php.net/post-max-size
|
||||
post_max_size = 20G
|
||||
post_max_size = 100M
|
||||
|
||||
; Automatically add files before PHP document.
|
||||
; http://php.net/auto-prepend-file
|
||||
@@ -802,7 +802,7 @@ upload_tmp_dir = /tmp/
|
||||
|
||||
; Maximum allowed size for uploaded files.
|
||||
; 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
|
||||
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,13 @@
|
||||
parameters:
|
||||
database_driver: %env.database_driver%
|
||||
database_host: %env.database_host%
|
||||
database_port: %env.database_port%
|
||||
database_name: %env.database_name%
|
||||
database_user: %env.database_user%
|
||||
database_password: %env.database_password%
|
||||
database_driver: pdo_sqlite
|
||||
database_host: 127.0.0.1
|
||||
database_port: ~
|
||||
database_name: symfony
|
||||
database_user: root
|
||||
database_password: ~
|
||||
database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite"
|
||||
database_table_prefix: wallabag_
|
||||
database_socket: null
|
||||
|
||||
test_database_driver: pdo_sqlite
|
||||
test_database_host: 127.0.0.1
|
||||
@@ -45,5 +46,7 @@ parameters:
|
||||
rabbitmq_password: guest
|
||||
|
||||
# Redis processing
|
||||
redis_scheme: tcp
|
||||
redis_host: localhost
|
||||
redis_port: 6379
|
||||
redis_path: 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"
|
||||
Reference in New Issue
Block a user