mirror of
https://github.com/wallabag/docker
synced 2025-12-15 18:56:29 +00:00
Merge branch 'master' into 2.6.x
This commit is contained in:
@@ -34,6 +34,7 @@ RUN set -ex \
|
|||||||
php81-mbstring \
|
php81-mbstring \
|
||||||
php81-openssl \
|
php81-openssl \
|
||||||
php81-pecl-amqp \
|
php81-pecl-amqp \
|
||||||
|
php81-pecl-imagick \
|
||||||
php81-pdo_mysql \
|
php81-pdo_mysql \
|
||||||
php81-pdo_pgsql \
|
php81-pdo_pgsql \
|
||||||
php81-pdo_sqlite \
|
php81-pdo_sqlite \
|
||||||
@@ -65,7 +66,7 @@ COPY --from=composer /usr/bin/composer /usr/local/bin/composer
|
|||||||
COPY root /
|
COPY root /
|
||||||
|
|
||||||
RUN set -ex \
|
RUN set -ex \
|
||||||
&& curl -L -o /tmp/wallabag.tar.gz https://github.com/wallabag/wallabag/archive/$WALLABAG_VERSION.tar.gz \
|
&& curl -L -o /tmp/wallabag.tar.gz https://github.com/wallabag/wallabag/releases/download/$WALLABAG_VERSION/wallabag-$WALLABAG_VERSION.tar.gz \
|
||||||
&& tar xvf /tmp/wallabag.tar.gz -C /tmp \
|
&& tar xvf /tmp/wallabag.tar.gz -C /tmp \
|
||||||
&& mkdir /var/www/wallabag \
|
&& mkdir /var/www/wallabag \
|
||||||
&& mv /tmp/wallabag-*/* /var/www/wallabag/ \
|
&& mv /tmp/wallabag-*/* /var/www/wallabag/ \
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ Default login is `wallabag:wallabag`.
|
|||||||
- `-e SYMFONY__ENV__MAILER_DSN=...` (defaults to "smtp://127.0.0.1")
|
- `-e SYMFONY__ENV__MAILER_DSN=...` (defaults to "smtp://127.0.0.1")
|
||||||
- `-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__TWOFACTOR_SENDER=...` (defaults to "`no-reply@wallabag.org`", the address wallabag uses for two-factor emails)
|
- `-e SYMFONY__ENV__TWOFACTOR_SENDER=...` (defaults to "`no-reply@wallabag.org`", the address wallabag uses for two-factor emails)
|
||||||
- `-e SYMFONY__ENV__FOSUSER_REGISTRATION=...`(defaults to "true", enable or disable public user registration)
|
- `-e SYMFONY__ENV__FOSUSER_REGISTRATION=...`(defaults to "false", enable or disable public user registration)
|
||||||
- `-e SYMFONY__ENV__FOSUSER_CONFIRMATION=...`(defaults to "true", enable or disable registration confirmation)
|
- `-e SYMFONY__ENV__FOSUSER_CONFIRMATION=...`(defaults to "true", enable or disable registration confirmation)
|
||||||
- `-e SYMFONY__ENV__DOMAIN_NAME=...` defaults to "`https://your-wallabag-instance.wallabag.org`", the URL of your wallabag instance)
|
- `-e SYMFONY__ENV__DOMAIN_NAME=...` defaults to "`https://your-wallabag-instance.wallabag.org`", 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_SCHEME=...` (defaults to "tcp", protocol to use to communicate with the target server (tcp, unix, or http))
|
||||||
@@ -112,6 +112,7 @@ version: '3'
|
|||||||
services:
|
services:
|
||||||
wallabag:
|
wallabag:
|
||||||
image: wallabag/wallabag
|
image: wallabag/wallabag
|
||||||
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_ROOT_PASSWORD=wallaroot
|
- MYSQL_ROOT_PASSWORD=wallaroot
|
||||||
- SYMFONY__ENV__DATABASE_DRIVER=pdo_mysql
|
- SYMFONY__ENV__DATABASE_DRIVER=pdo_mysql
|
||||||
@@ -131,7 +132,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- /opt/wallabag/images:/var/www/wallabag/web/assets/images
|
- /opt/wallabag/images:/var/www/wallabag/web/assets/images
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "wget" ,"--no-verbose", "--tries=1", "--spider", "http://localhost"]
|
test: ["CMD", "wget" ,"--no-verbose", "--tries=1", "--spider", "http://localhost/api/info"]
|
||||||
interval: 1m
|
interval: 1m
|
||||||
timeout: 3s
|
timeout: 3s
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -139,6 +140,7 @@ services:
|
|||||||
- redis
|
- redis
|
||||||
db:
|
db:
|
||||||
image: mariadb
|
image: mariadb
|
||||||
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_ROOT_PASSWORD=wallaroot
|
- MYSQL_ROOT_PASSWORD=wallaroot
|
||||||
volumes:
|
volumes:
|
||||||
@@ -149,6 +151,7 @@ services:
|
|||||||
timeout: 3s
|
timeout: 3s
|
||||||
redis:
|
redis:
|
||||||
image: redis:alpine
|
image: redis:alpine
|
||||||
|
restart: unless-stopped
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "redis-cli", "ping"]
|
test: ["CMD", "redis-cli", "ping"]
|
||||||
interval: 20s
|
interval: 20s
|
||||||
|
|||||||
@@ -23,6 +23,8 @@ install_wallabag() {
|
|||||||
provisioner() {
|
provisioner() {
|
||||||
SYMFONY__ENV__DATABASE_DRIVER=${SYMFONY__ENV__DATABASE_DRIVER:-pdo_sqlite}
|
SYMFONY__ENV__DATABASE_DRIVER=${SYMFONY__ENV__DATABASE_DRIVER:-pdo_sqlite}
|
||||||
POPULATE_DATABASE=${POPULATE_DATABASE:-True}
|
POPULATE_DATABASE=${POPULATE_DATABASE:-True}
|
||||||
|
SQLITE_DB_DIR="/var/www/wallabag/data/db"
|
||||||
|
SQLITE_DB_FILEPATH="$SQLITE_DB_DIR/wallabag.sqlite"
|
||||||
|
|
||||||
# Replace environment variables
|
# Replace environment variables
|
||||||
envsubst < /etc/wallabag/parameters.template.yml > app/config/parameters.yml
|
envsubst < /etc/wallabag/parameters.template.yml > app/config/parameters.yml
|
||||||
@@ -33,11 +35,18 @@ provisioner() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Configure SQLite database
|
# Configure SQLite database
|
||||||
SQLITE_FILE_SIZE=$(wc -c "/var/www/wallabag/data/db/wallabag.sqlite" | awk '{print $1}')
|
if [ "$SYMFONY__ENV__DATABASE_DRIVER" = "pdo_sqlite" ]; then
|
||||||
if [ "$SYMFONY__ENV__DATABASE_DRIVER" = "pdo_sqlite" ] && ([ ! -f "/var/www/wallabag/data/db/wallabag.sqlite" ] || [ "$SQLITE_FILE_SIZE" = 0 ]) ; then
|
# mkdir and chown are mandatory for local folder binding
|
||||||
|
if [ ! -f "$SQLITE_DB_FILEPATH" ]; then
|
||||||
|
mkdir -p "$SQLITE_DB_DIR"
|
||||||
|
chown nobody: "$SQLITE_DB_DIR"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -s "$SQLITE_DB_FILEPATH" ]; then
|
||||||
echo "Configuring the SQLite database ..."
|
echo "Configuring the SQLite database ..."
|
||||||
install_wallabag
|
install_wallabag
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Configure MySQL / MariaDB database
|
# Configure MySQL / MariaDB database
|
||||||
if [ "$SYMFONY__ENV__DATABASE_DRIVER" = "pdo_mysql" ] && [ "$POPULATE_DATABASE" = "True" ] && [ "$MYSQL_ROOT_PASSWORD" != "" ] ; then
|
if [ "$SYMFONY__ENV__DATABASE_DRIVER" = "pdo_mysql" ] && [ "$POPULATE_DATABASE" = "True" ] && [ "$MYSQL_ROOT_PASSWORD" != "" ] ; then
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ http {
|
|||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
|
listen [::0]:80;
|
||||||
server_name _;
|
server_name _;
|
||||||
root /var/www/wallabag/web;
|
root /var/www/wallabag/web;
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ parameters:
|
|||||||
twofactor_sender: ${SYMFONY__ENV__TWOFACTOR_SENDER:-no-reply@wallabag.org}
|
twofactor_sender: ${SYMFONY__ENV__TWOFACTOR_SENDER:-no-reply@wallabag.org}
|
||||||
|
|
||||||
# fosuser stuff
|
# fosuser stuff
|
||||||
fosuser_registration: ${SYMFONY__ENV__FOSUSER_REGISTRATION:-true}
|
fosuser_registration: ${SYMFONY__ENV__FOSUSER_REGISTRATION:-false}
|
||||||
fosuser_confirmation: ${SYMFONY__ENV__FOSUSER_CONFIRMATION:-true}
|
fosuser_confirmation: ${SYMFONY__ENV__FOSUSER_CONFIRMATION:-true}
|
||||||
|
|
||||||
# how long the access token should live in seconds for the API
|
# how long the access token should live in seconds for the API
|
||||||
|
|||||||
@@ -52,7 +52,6 @@ def test_accessing_login_page(wallabag_service):
|
|||||||
assert r.status_code == 200
|
assert r.status_code == 200
|
||||||
assert 'Log in' in r.text
|
assert 'Log in' in r.text
|
||||||
assert 'Password' in r.text
|
assert 'Password' in r.text
|
||||||
assert 'Register' in r.text
|
|
||||||
assert 'Username' in r.text
|
assert 'Username' in r.text
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user