-
-
Save virtadpt/8c7aa92e2d05f01640e3c5ddc5c1455f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# please read every steps as this is not an automated script | |
# tested on LXC alpine 3.12 | |
# 2.3.8 compatible only with php 7.2 (alpine 3.9) | |
vi /etc/apk/repositories # change to 3.9 | |
# update and install | |
apk update && apk add php php-dom php-simplexml php-json php-gd php-mbstring php-xml php-tidy php-iconv php-curl php-gettext php-tokenizer php-bcmath php-intl php-session php-fpm php-pdo_mysql mariadb mariadb-client nginx iproute2 | |
# start at boot | |
rc-update add mariadb | |
rc-update add nginx | |
rc-update add php-fpm7 | |
# download the package | |
mkdir -p /var/www/wallabag | |
wget https://wllbg.org/latest-v2-package -O - | tar xzf - -C /var/www/wallabag --strip-components=1 | |
# setup database | |
/etc/init.d/mariadb setup | |
rc-service mariadb start | |
mysql_secure_installation | |
mysql -u root -p -e "create database wallabag" | |
# setup php-fpm | |
# change user,group -> nginx | |
vi /etc/php7/php-fpm.d/www.conf | |
# edit wallabag config file | |
# Beware that passwords must be surrounded by single quotes ' | |
# db_host -> localhost, port -> 3306, pass, instance url -> "192..." | |
vi /var/www/wallabag/app/config/parameters.yml | |
cd /var/www/wallabag | |
php /var/www/wallabag/bin/console wallabag:install --env=prod | |
# if error run "php /var/www/wallabag/bin/console cache:clear --env=prod" | |
# set folder permission | |
chown -R nginx: /var/www/wallabag | |
### NGINX CONFIG /etc/nginx/conf.d/default.conf | |
server { | |
listen 80; | |
server_name _; | |
root /var/www/wallabag/web; | |
location / { | |
try_files $uri /app.php$is_args$args; | |
} | |
location ~ ^/app\.php(/|$) { | |
fastcgi_pass 127.0.0.1:9000; | |
fastcgi_split_path_info ^(.+\.php)(/.*)$; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; | |
fastcgi_param DOCUMENT_ROOT $realpath_root; | |
internal; | |
} | |
location ~ \.php$ { | |
return 404; | |
} | |
error_log /var/log/nginx/wallabag_error.log; | |
access_log /var/log/nginx/wallabag_access.log; | |
} | |
### | |
# start the service | |
rc-service php-fpm7 start | |
rc-service nginx start | |
# optional steps (changing config) | |
vi /var/www/wallabag/app/config/parameters.yml | |
php /var/www/wallabag/bin/console cache:clear --env=prod |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment