aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--.docker/.htaccess (renamed from docker/.htaccess)0
-rw-r--r--.docker/nginx.conf (renamed from docker/alpine/nginx.conf)0
-rw-r--r--.docker/php-fpm.conf (renamed from docker/alpine/php-fpm.conf)0
-rwxr-xr-x.docker/services.d/.s6-svscan/finish (renamed from docker/alpine/services.d/.s6-svscan/finish)0
-rwxr-xr-x.docker/services.d/nginx/run (renamed from docker/alpine/services.d/nginx/run)0
-rwxr-xr-x.docker/services.d/php-fpm/run (renamed from docker/alpine/services.d/php-fpm/run)0
-rw-r--r--.dockerignore51
-rw-r--r--.gitattributes4
-rw-r--r--.travis.yml9
-rw-r--r--AUTHORS14
-rw-r--r--CHANGELOG.md63
-rw-r--r--Dockerfile (renamed from docker/alpine/Dockerfile.master)28
-rw-r--r--Dockerfile.armhf (renamed from docker/alpine/Dockerfile.armhf.master)8
-rw-r--r--Makefile2
-rw-r--r--README.md4
-rw-r--r--doc/md/3rd-party-libraries.md16
-rw-r--r--doc/md/Community-&-Related-software.md3
-rw-r--r--doc/md/Download-and-Installation.md15
-rw-r--r--doc/md/FAQ.md4
-rw-r--r--doc/md/REST-API.md5
-rw-r--r--doc/md/Server-configuration.md211
-rw-r--r--doc/md/Server-requirements.md42
-rw-r--r--doc/md/Sharing-content.md26
-rw-r--r--doc/md/Unit-tests-Docker.md6
-rw-r--r--doc/md/docker/shaarli-images.md49
-rw-r--r--doc/md/index.md83
-rw-r--r--docker/alpine/Dockerfile.armhf.latest49
-rw-r--r--docker/alpine/Dockerfile.latest54
-rw-r--r--docker/alpine/IMAGE.md10
-rw-r--r--docker/debian/Dockerfile.stable37
-rw-r--r--docker/debian/IMAGE.md5
-rw-r--r--docker/debian/nginx.conf72
-rw-r--r--docker/debian/supervised.conf13
-rw-r--r--index.php7
-rw-r--r--mkdocs.yml4
-rw-r--r--tests/docker/alpine36/Dockerfile (renamed from docker/test/alpine36/Dockerfile)0
-rw-r--r--tests/docker/debian8/Dockerfile (renamed from docker/test/debian8/Dockerfile)0
-rw-r--r--tests/docker/debian9/Dockerfile (renamed from docker/test/debian9/Dockerfile)0
-rw-r--r--tests/docker/ubuntu16/Dockerfile (renamed from docker/test/ubuntu16/Dockerfile)0
-rw-r--r--tpl/default/includes.html1
40 files changed, 421 insertions, 474 deletions
diff --git a/docker/.htaccess b/.docker/.htaccess
index f601c1ee..f601c1ee 100644
--- a/docker/.htaccess
+++ b/.docker/.htaccess
diff --git a/docker/alpine/nginx.conf b/.docker/nginx.conf
index 07fba33f..07fba33f 100644
--- a/docker/alpine/nginx.conf
+++ b/.docker/nginx.conf
diff --git a/docker/alpine/php-fpm.conf b/.docker/php-fpm.conf
index 0843c164..0843c164 100644
--- a/docker/alpine/php-fpm.conf
+++ b/.docker/php-fpm.conf
diff --git a/docker/alpine/services.d/.s6-svscan/finish b/.docker/services.d/.s6-svscan/finish
index 1dadeeaf..1dadeeaf 100755
--- a/docker/alpine/services.d/.s6-svscan/finish
+++ b/.docker/services.d/.s6-svscan/finish
diff --git a/docker/alpine/services.d/nginx/run b/.docker/services.d/nginx/run
index 21e7b0d6..21e7b0d6 100755
--- a/docker/alpine/services.d/nginx/run
+++ b/.docker/services.d/nginx/run
diff --git a/docker/alpine/services.d/php-fpm/run b/.docker/services.d/php-fpm/run
index 21dd0107..21dd0107 100755
--- a/docker/alpine/services.d/php-fpm/run
+++ b/.docker/services.d/php-fpm/run
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 00000000..a0d28dc6
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,51 @@
1# Docker-ignore
2.dev
3.git
4.github
5tests
6
7# Shaarli runtime resources
8cache/*
9data/*
10pagecache/*
11tmp/*
12
13# Eclipse project files
14.settings
15.buildpath
16.project
17
18# Raintpl generated pages
19*.rtpl.php
20
21# 3rd-party dependencies
22vendor/
23
24# Release archives
25*.tar.gz
26*.zip
27inc/languages/*/LC_MESSAGES/shaarli.mo
28
29# Development and test resources
30coverage
31doxygen
32sandbox
33phpmd.html
34
35# User plugin configuration
36plugins/*/config.php
37
38# 3rd party themes
39tpl/*
40!tpl/default
41!tpl/vintage
42
43# Front end
44node_modules
45tpl/default/js
46tpl/default/css
47tpl/default/fonts
48tpl/default/img
49tpl/vintage/js
50tpl/vintage/css
51tpl/vintage/img
diff --git a/.gitattributes b/.gitattributes
index 6b6ffbd5..9d22f11b 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -33,7 +33,9 @@ Dockerfile text
33.travis.yml export-ignore 33.travis.yml export-ignore
34doc/**/*.json export-ignore 34doc/**/*.json export-ignore
35doc/**/*.md export-ignore 35doc/**/*.md export-ignore
36docker/ export-ignore 36.docker/ export-ignore
37.dockerignore export-ignore
38Dockerfile* export-ignore
37Doxyfile export-ignore 39Doxyfile export-ignore
38Makefile export-ignore 40Makefile export-ignore
39node_modules/ export-ignore 41node_modules/ export-ignore
diff --git a/.travis.yml b/.travis.yml
index eee1ca74..cb81846f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -28,6 +28,15 @@ matrix:
28 - yarn run build # Just to be sure that the build isn't broken 28 - yarn run build # Just to be sure that the build isn't broken
29 - make eslint 29 - make eslint
30 - make sasslint 30 - make sasslint
31 - language: python
32 python: 3.6
33 cache:
34 directories:
35 - $HOME/.cache/pip
36 install:
37 - pip install mkdocs
38 script:
39 - mkdocs build --clean
31 40
32cache: 41cache:
33 directories: 42 directories:
diff --git a/AUTHORS b/AUTHORS
index c0414c0e..409a0308 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,6 +1,6 @@
1 588 ArthurHoaro <arthur@hoa.ro> 1 647 ArthurHoaro <arthur@hoa.ro>
2 283 VirtualTam <virtualtam@flibidi.net> 2 327 VirtualTam <virtualtam@flibidi.net>
3 179 nodiscc <nodiscc@gmail.com> 3 187 nodiscc <nodiscc@gmail.com>
4 56 Sébastien Sauvage <sebsauvage@sebsauvage.net> 4 56 Sébastien Sauvage <sebsauvage@sebsauvage.net>
5 15 Florian Eula <eula.florian@gmail.com> 5 15 Florian Eula <eula.florian@gmail.com>
6 13 Emilien Klein <emilien@klein.st> 6 13 Emilien Klein <emilien@klein.st>
@@ -9,10 +9,11 @@
9 8 Christophe HENRY <christophe.henry@sbgodin.fr> 9 8 Christophe HENRY <christophe.henry@sbgodin.fr>
10 6 B. van Berkum <dev@dotmpe.com> 10 6 B. van Berkum <dev@dotmpe.com>
11 5 Lucas Cimon <lucas.cimon@gmail.com> 11 5 Lucas Cimon <lucas.cimon@gmail.com>
12 5 Mark Schmitz <kramred@gmail.com>
13 5 kalvn <kalvnthereal@gmail.com>
12 4 Alexandre Alapetite <alexandre@alapetite.fr> 14 4 Alexandre Alapetite <alexandre@alapetite.fr>
13 4 David Sferruzza <david.sferruzza@gmail.com> 15 4 David Sferruzza <david.sferruzza@gmail.com>
14 4 Immánuel Fodor <immanuelfactor+github@gmail.com> 16 4 Immánuel Fodor <immanuelfactor+github@gmail.com>
15 4 kalvn <kalvnthereal@gmail.com>
16 3 Teromene <teromene@teromene.fr> 17 3 Teromene <teromene@teromene.fr>
17 2 Chris Kuethe <chris.kuethe@gmail.com> 18 2 Chris Kuethe <chris.kuethe@gmail.com>
18 2 Knah Tsaeb <Knah-Tsaeb@knah-tsaeb.org> 19 2 Knah Tsaeb <Knah-Tsaeb@knah-tsaeb.org>
@@ -24,11 +25,15 @@
24 2 julienCXX <software@chmodplusx.eu> 25 2 julienCXX <software@chmodplusx.eu>
25 2 philipp-r <philipp-r@users.noreply.github.com> 26 2 philipp-r <philipp-r@users.noreply.github.com>
26 1 Adrien Oliva <adrien.oliva@yapbreak.fr> 27 1 Adrien Oliva <adrien.oliva@yapbreak.fr>
28 1 Alexandre G.-Raymond <alex@ndre.gr>
27 1 Alexis J <alexis@effingo.be> 29 1 Alexis J <alexis@effingo.be>
30 1 Angristan <angristan@users.noreply.github.com>
28 1 BoboTiG <bobotig@gmail.com> 31 1 BoboTiG <bobotig@gmail.com>
29 1 Bronco <bronco@warriordudimanche.net> 32 1 Bronco <bronco@warriordudimanche.net>
33 1 Buster One <37770318+buster-one@users.noreply.github.com>
30 1 D Low <daniellowtw@gmail.com> 34 1 D Low <daniellowtw@gmail.com>
31 1 Daniel Jakots <vigdis@chown.me> 35 1 Daniel Jakots <vigdis@chown.me>
36 1 Dennis Verspuij <dennisverspuij@users.noreply.github.com>
32 1 Dimtion <zizou.xena@gmail.com> 37 1 Dimtion <zizou.xena@gmail.com>
33 1 Fanch <fanch-github@qth.fr> 38 1 Fanch <fanch-github@qth.fr>
34 1 Felix Bartels <felix@host-consultants.de> 39 1 Felix Bartels <felix@host-consultants.de>
@@ -37,6 +42,7 @@
37 1 Franck Kerbiriou <FranckKe@users.noreply.github.com> 42 1 Franck Kerbiriou <FranckKe@users.noreply.github.com>
38 1 Gary Marigliano <gmarigliano93@gmail.com> 43 1 Gary Marigliano <gmarigliano93@gmail.com>
39 1 Guillaume Virlet <github@virlet.org> 44 1 Guillaume Virlet <github@virlet.org>
45 1 Jonathan Amiez <jonathan.amiez@gmail.com>
40 1 Jonathan Druart <jonathan.druart@gmail.com> 46 1 Jonathan Druart <jonathan.druart@gmail.com>
41 1 Julien Pivotto <roidelapluie@inuits.eu> 47 1 Julien Pivotto <roidelapluie@inuits.eu>
42 1 Kevin Canévet <kevin@streamroot.io> 48 1 Kevin Canévet <kevin@streamroot.io>
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3218f4d8..bafbd06c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,10 +5,58 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
5and this project adheres to [Semantic Versioning](http://semver.org/). 5and this project adheres to [Semantic Versioning](http://semver.org/).
6 6
7## [v0.10.0](https://github.com/shaarli/Shaarli/releases/tag/v0.10.0) - UNPUBLISHED 7## [v0.10.0](https://github.com/shaarli/Shaarli/releases/tag/v0.10.0) - UNPUBLISHED
8**PHP 5.5 compatibility has been dropped.** Shaarli now requires at least PHP 5.6.
9
10### Added
11- Add a filter to display public links only
12- Add PHP 7.2 support
13- Add German translation
14- Resolve front-end dependencies from NPM
15- Build front-end bundles with Yarn and Webpack
16- Lint Javascript code with ESLint
17- Lint SASS code with SASSLint
18- Support redirection in cURL download callback
19- Introduce multi-stage builds for Docker images
20- Use Travis matrix and stages to run Javascript tests in a dedicated environment
21
22### Changed
23- Use a specific page title in all pages
24- Daily: run hooks before creating the columns
25- Load theme translations files automatically
26- Make max download size and timeout configurable
27- Make Nginx logs accessible as stdout/stderr for Docker images
28- Update buttons used to toggle link visibility filters
29- Rewrite Javascript code for ES6 compliance
30- Refactor IP ban management
31- Refactor user login management
32- Refactor server-side session management
33- Update Doxygen configuration
34- Update Parsedown
35
36### Removed
37- Drop support for PHP 5.5
38- Remove vendored front-end libraries
39- Remove environment specific .gitignore entries
40
41### Fixed
42- Ignore the case while checking DOCTYPE during the file import
43- Fix removal of on=... attributes from html generated from Markdown
44- httpd: always forward the 'Authorization' header
45- Ensure user-specific CSS file is loaded
46- Fix feed permalink rendering when Markdown escaping is enabled
47- Fix order of tags with the same number of occurrences
48
49### Security
50- Update `.htaccess` to prevent accessing Git metadata when using a Git-based installation
51
52
53## [v0.9.7](https://github.com/shaarli/Shaarli/releases/tag/v0.9.7) - 2018-06-20
54### Changed
55- Build the Docker images from the local Git sources
8 56
9 57
10## [v0.9.6](https://github.com/shaarli/Shaarli/releases/tag/v0.9.6) - 2018-03-25 58## [v0.9.6](https://github.com/shaarli/Shaarli/releases/tag/v0.9.6) - 2018-03-25
11## Changed 59### Changed
12- htaccess: prevent accessing resources not managed by SCM 60- htaccess: prevent accessing resources not managed by SCM
13- htaccess: always forward the 'Authorization' HTTP header 61- htaccess: always forward the 'Authorization' HTTP header
14 62
@@ -222,6 +270,19 @@ Theming:
222- Markdown plugin: escape HTML entities by default 270- Markdown plugin: escape HTML entities by default
223 271
224 272
273## [v0.8.7](https://github.com/shaarli/Shaarli/releases/tag/v0.8.7) - 2018-06-20
274### Changed
275- Build the Docker image from the local Git sources
276
277### Removed
278- Disable PHP 5.3 Travis build (unsupported)
279
280
281## [v0.8.6](https://github.com/shaarli/Shaarli/releases/tag/v0.8.6) - 2018-02-19
282### Changed
283- Run version check tests against the 'stable' branch
284
285
225## [v0.8.5](https://github.com/shaarli/Shaarli/releases/tag/v0.8.5) - 2018-01-04 286## [v0.8.5](https://github.com/shaarli/Shaarli/releases/tag/v0.8.5) - 2018-01-04
226**XSS vulnerability fixed. Please update.** 287**XSS vulnerability fixed. Please update.**
227 288
diff --git a/docker/alpine/Dockerfile.master b/Dockerfile
index 7bbe1fb7..6261e81b 100644
--- a/docker/alpine/Dockerfile.master
+++ b/Dockerfile
@@ -1,13 +1,20 @@
1# Stage 1: 1# Stage 1:
2# - Get Shaarli sources 2# - Copy Shaarli sources
3# - Build documentation
4FROM python:3-alpine as docs
5ADD . /usr/src/app/shaarli
6RUN cd /usr/src/app/shaarli \
7 && pip install --no-cache-dir mkdocs \
8 && mkdocs build --clean
9
10# Stage 2:
3# - Resolve PHP dependencies with Composer 11# - Resolve PHP dependencies with Composer
4FROM composer:latest as composer 12FROM composer:latest as composer
5RUN curl -L https://github.com/shaarli/Shaarli/archive/master.tar.gz | tar xzf - \ 13COPY --from=docs /usr/src/app/shaarli /app/shaarli
6 && mv Shaarli-master shaarli \ 14RUN cd shaarli \
7 && cd shaarli \
8 && composer --prefer-dist --no-dev install 15 && composer --prefer-dist --no-dev install
9 16
10# Stage 2: 17# Stage 3:
11# - Frontend dependencies 18# - Frontend dependencies
12FROM node:9.9-alpine as node 19FROM node:9.9-alpine as node
13COPY --from=composer /app/shaarli shaarli 20COPY --from=composer /app/shaarli shaarli
@@ -16,9 +23,9 @@ RUN cd shaarli \
16 && yarn run build \ 23 && yarn run build \
17 && rm -rf node_modules 24 && rm -rf node_modules
18 25
19# Stage 3: 26# Stage 4:
20# - Shaarli image 27# - Shaarli image
21FROM alpine:3.6 28FROM alpine:3.7
22LABEL maintainer="Shaarli Community" 29LABEL maintainer="Shaarli Community"
23 30
24RUN apk --update --no-cache add \ 31RUN apk --update --no-cache add \
@@ -39,9 +46,9 @@ RUN apk --update --no-cache add \
39 php7-zlib \ 46 php7-zlib \
40 s6 47 s6
41 48
42COPY nginx.conf /etc/nginx/nginx.conf 49COPY .docker/nginx.conf /etc/nginx/nginx.conf
43COPY php-fpm.conf /etc/php7/php-fpm.conf 50COPY .docker/php-fpm.conf /etc/php7/php-fpm.conf
44COPY services.d /etc/services.d 51COPY .docker/services.d /etc/services.d
45 52
46RUN rm -rf /etc/php7/php-fpm.d/www.conf \ 53RUN rm -rf /etc/php7/php-fpm.d/www.conf \
47 && sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php7/php.ini \ 54 && sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php7/php.ini \
@@ -55,6 +62,7 @@ RUN chown -R nginx:nginx . \
55 && ln -sf /dev/stdout /var/log/nginx/shaarli.access.log \ 62 && ln -sf /dev/stdout /var/log/nginx/shaarli.access.log \
56 && ln -sf /dev/stderr /var/log/nginx/shaarli.error.log 63 && ln -sf /dev/stderr /var/log/nginx/shaarli.error.log
57 64
65VOLUME /var/www/shaarli/cache
58VOLUME /var/www/shaarli/data 66VOLUME /var/www/shaarli/data
59 67
60EXPOSE 80 68EXPOSE 80
diff --git a/docker/alpine/Dockerfile.armhf.master b/Dockerfile.armhf
index 6c89adc3..5dcc34aa 100644
--- a/docker/alpine/Dockerfile.armhf.master
+++ b/Dockerfile.armhf
@@ -1,5 +1,5 @@
1FROM lsiobase/alpine.armhf:3.6 1FROM lsiobase/alpine.armhf:3.6
2MAINTAINER Shaarli Community 2LABEL maintainer="Shaarli Community"
3 3
4RUN apk --update --no-cache add \ 4RUN apk --update --no-cache add \
5 ca-certificates \ 5 ca-certificates \
@@ -21,9 +21,9 @@ RUN apk --update --no-cache add \
21 php7-zlib \ 21 php7-zlib \
22 s6 22 s6
23 23
24COPY nginx.conf /etc/nginx/nginx.conf 24COPY .docker/nginx.conf /etc/nginx/nginx.conf
25COPY php-fpm.conf /etc/php7/php-fpm.conf 25COPY .docker/php-fpm.conf /etc/php7/php-fpm.conf
26COPY services.d /etc/services.d 26COPY .docker/services.d /etc/services.d
27 27
28RUN curl -sS https://getcomposer.org/installer | php7 -- --install-dir=/usr/local/bin --filename=composer \ 28RUN curl -sS https://getcomposer.org/installer | php7 -- --install-dir=/usr/local/bin --filename=composer \
29 && rm -rf /etc/php7/php-fpm.d/www.conf \ 29 && rm -rf /etc/php7/php-fpm.d/www.conf \
diff --git a/Makefile b/Makefile
index 4adbdd68..b0cdadf0 100644
--- a/Makefile
+++ b/Makefile
@@ -207,7 +207,7 @@ htmldoc:
207 python3 -m venv venv/ 207 python3 -m venv venv/
208 bash -c 'source venv/bin/activate; \ 208 bash -c 'source venv/bin/activate; \
209 pip install mkdocs; \ 209 pip install mkdocs; \
210 mkdocs build' 210 mkdocs build --clean'
211 find doc/html/ -type f -exec chmod a-x '{}' \; 211 find doc/html/ -type f -exec chmod a-x '{}' \;
212 rm -r venv 212 rm -r venv
213 213
diff --git a/README.md b/README.md
index df9018b6..8199e3f8 100644
--- a/README.md
+++ b/README.md
@@ -6,10 +6,10 @@ _Do you want to share the links you discover?_
6_Shaarli is a minimalist link sharing service that you can install on your own server._ 6_Shaarli is a minimalist link sharing service that you can install on your own server._
7_It is designed to be personal (single-user), fast and handy._ 7_It is designed to be personal (single-user), fast and handy._
8 8
9[![](https://img.shields.io/badge/stable-v0.8.6-blue.svg)](https://github.com/shaarli/Shaarli/releases/tag/v0.8.6) 9[![](https://img.shields.io/badge/stable-v0.8.7-blue.svg)](https://github.com/shaarli/Shaarli/releases/tag/v0.8.7)
10[![](https://img.shields.io/travis/shaarli/Shaarli/stable.svg?label=stable)](https://travis-ci.org/shaarli/Shaarli) 10[![](https://img.shields.io/travis/shaarli/Shaarli/stable.svg?label=stable)](https://travis-ci.org/shaarli/Shaarli)
11&bull; 11&bull;
12[![](https://img.shields.io/badge/latest-v0.9.6-blue.svg)](https://github.com/shaarli/Shaarli/releases/tag/v0.9.6) 12[![](https://img.shields.io/badge/latest-v0.9.7-blue.svg)](https://github.com/shaarli/Shaarli/releases/tag/v0.9.7)
13[![](https://img.shields.io/travis/shaarli/Shaarli/latest.svg?label=latest)](https://travis-ci.org/shaarli/Shaarli) 13[![](https://img.shields.io/travis/shaarli/Shaarli/latest.svg?label=latest)](https://travis-ci.org/shaarli/Shaarli)
14&bull; 14&bull;
15[![](https://img.shields.io/badge/master-v0.10.x-blue.svg)](https://github.com/shaarli/Shaarli) 15[![](https://img.shields.io/badge/master-v0.10.x-blue.svg)](https://github.com/shaarli/Shaarli)
diff --git a/doc/md/3rd-party-libraries.md b/doc/md/3rd-party-libraries.md
index ebab7a46..7e7dd334 100644
--- a/doc/md/3rd-party-libraries.md
+++ b/doc/md/3rd-party-libraries.md
@@ -1,13 +1,21 @@
1## CSS 1## CSS
2- Yahoo UI [CSS Reset](http://yuilibrary.com/yui/docs/cssreset/) 2
3 - resets default CSS properties for all HTML elements (overriding browsers' default values) 3- Yahoo UI [CSS Reset](http://yuilibrary.com/yui/docs/cssreset/) - standardize cross-browser rendering
4 - ensures custom CSS stylessheets will provide the same results on all browsers
5 4
6## Javascript 5## Javascript
6
7- [Awesomeplete](https://leaverou.github.io/awesomplete/) ([GitHub](https://github.com/LeaVerou/awesomplete)) - autocompletion in input forms 7- [Awesomeplete](https://leaverou.github.io/awesomplete/) ([GitHub](https://github.com/LeaVerou/awesomplete)) - autocompletion in input forms
8- [bLazy](http://dinbror.dk/blazy/) ([GitHub](https://github.com/dinbror/blazy)) - lazy loading for thumbnails 8- [bLazy](http://dinbror.dk/blazy/) ([GitHub](https://github.com/dinbror/blazy)) - lazy loading for thumbnails
9- [qr.js](http://neocotic.com/qr.js/) ([GitHub](https://github.com/neocotic/qr.js)) - QR code generation 9- [qr.js](http://neocotic.com/qr.js/) ([GitHub](https://github.com/neocotic/qr.js)) - QR code generation
10 10
11## PHP 11## PHP
12- [shaarli/netscape-bookmark-parser](https://github.com/shaarli/netscape-bookmark-parser) - Netscape bookmark parser 12
13- [RainTPL](https://github.com/rainphp/raintpl) - HTML templating for PHP 13- [RainTPL](https://github.com/rainphp/raintpl) - HTML templating for PHP
14
15### Composer
16
17Library | Usage
18---|---
19[`shaarli/netscape-bookmark-parser`](https://packagist.org/packages/shaarli/netscape-bookmark-parser) | Import bookmarks from Netscape files
20[`erusev/parsedown`](https://packagist.org/packages/erusev/parsedown) | Parse MarkDown syntax for the MarkDown plugin
21[`slim/slim`](https://packagist.org/packages/slim/slim) | Handle routes and middleware for the REST API
diff --git a/doc/md/Community-&-Related-software.md b/doc/md/Community-&-Related-software.md
index 7c570acf..49c20c9c 100644
--- a/doc/md/Community-&-Related-software.md
+++ b/doc/md/Community-&-Related-software.md
@@ -32,7 +32,8 @@ See [Theming](Theming) for a list of community-contributed themes, and an instal
32- [tt-rss-shaarli](https://github.com/jcsaaddupuy/tt-rss-shaarli) - [Tiny-Tiny RSS](http://tt-rss.org/) plugin that adds support for sharing articles with Shaarli 32- [tt-rss-shaarli](https://github.com/jcsaaddupuy/tt-rss-shaarli) - [Tiny-Tiny RSS](http://tt-rss.org/) plugin that adds support for sharing articles with Shaarli
33- [octopress-shaarli](https://github.com/ahmet2mir/octopress-shaarli) - Octopress plugin to retrieve Shaarli links on the sidebar 33- [octopress-shaarli](https://github.com/ahmet2mir/octopress-shaarli) - Octopress plugin to retrieve Shaarli links on the sidebar
34- [Scuttle to Shaarli](https://github.com/q2apro/scuttle-to-shaarli) - Import bookmarks from Scuttle 34- [Scuttle to Shaarli](https://github.com/q2apro/scuttle-to-shaarli) - Import bookmarks from Scuttle
35 35- [Shaarli app for Cloudron](https://git.cloudron.io/cloudron/shaarli-app) - Effortlessly run Shaarli with the help of [Cloudron](https://cloudron.io/) [![Install](https://cloudron.io/img/button.svg)](https://cloudron.io/button.html?app=com.github.shaarli)
36- [Shaarli_ynh](https://github.com/YunoHost-Apps/shaarli_ynh) - Shaarli is available as a [Yunohost](https://yunohost.org) app [![Install Shaarli with YunoHost](https://install-app.yunohost.org/install-with-yunohost.png)](https://install-app.yunohost.org/?app=shaarli)
36 37
37### Mobile Apps 38### Mobile Apps
38- [ShaarliOS](https://github.com/mro/ShaarliOS) - Apple iOS share extension. 39- [ShaarliOS](https://github.com/mro/ShaarliOS) - Apple iOS share extension.
diff --git a/doc/md/Download-and-Installation.md b/doc/md/Download-and-Installation.md
index 20138f49..14649e06 100644
--- a/doc/md/Download-and-Installation.md
+++ b/doc/md/Download-and-Installation.md
@@ -1,8 +1,7 @@
1To install Shaarli, simply place the files in a directory under your webserver's 1To install Shaarli, simply place the files in a directory under your webserver's
2Document Root (or directly at the document root). 2Document Root (or directly at the document root).
3 3
4Also, please make sure your server meets the [requirements](Server-requirements) 4Also, please make sure your server is properly [configured](Server-configuration).
5and is properly [configured](Server-configuration).
6 5
7Multiple releases branches are available: 6Multiple releases branches are available:
8 7
@@ -23,13 +22,13 @@ Using one of the following methods:
23 22
24### Download as an archive 23### Download as an archive
25 24
26In most cases, you should download the latest Shaarli release from the [releases](https://github.com/shaarli/Shaarli/releases) page. **Download our *shaarli-full* archive** to include dependencies. 25In most cases, you should download the latest Shaarli release from the [releases](https://github.com/shaarli/Shaarli/releases) page. Download our **shaarli-full** archive to include dependencies.
27 26
28The current latest released version is `v0.9.6` 27The current latest released version is `v0.9.7`
29 28
30```bash 29```bash
31$ wget https://github.com/shaarli/Shaarli/releases/download/v0.9.6/shaarli-v0.9.6-full.zip 30$ wget https://github.com/shaarli/Shaarli/releases/download/v0.9.7/shaarli-v0.9.7-full.zip
32$ unzip shaarli-v0.9.6-full.zip 31$ unzip shaarli-v0.9.7-full.zip
33$ mv Shaarli /path/to/shaarli/ 32$ mv Shaarli /path/to/shaarli/
34``` 33```
35 34
@@ -37,7 +36,7 @@ $ mv Shaarli /path/to/shaarli/
37 36
38Cloning using `git` or downloading Github branches as zip files requires additional steps: 37Cloning using `git` or downloading Github branches as zip files requires additional steps:
39 38
40 * Install [Composer](Unit-tests.md#install_composer) to manage Shaarli dependencies. 39 * Install [Composer](Unit-tests.md#install_composer) to manage third-party [PHP dependencies](3rd-party-libraries.md#composer).
41 * Install [yarn](https://yarnpkg.com/lang/en/docs/install/) to build the frontend dependencies. 40 * Install [yarn](https://yarnpkg.com/lang/en/docs/install/) to build the frontend dependencies.
42 * Install [python3-virtualenv](https://pypi.python.org/pypi/virtualenv) to build the local HTML documentation. 41 * Install [python3-virtualenv](https://pypi.python.org/pypi/virtualenv) to build the local HTML documentation.
43 42
@@ -94,7 +93,7 @@ $ composer install --no-dev --prefer-dist
94_Use at your own risk!_ 93_Use at your own risk!_
95 94
96Install [Composer](Unit-tests.md#install_composer) to manage Shaarli PHP dependencies, 95Install [Composer](Unit-tests.md#install_composer) to manage Shaarli PHP dependencies,
97and [yarn](https://yarnpkg.com/lang/en/docs/install/) 96and [yarn](https://yarnpkg.com/lang/en/docs/install/)
98for front-end dependencies. 97for front-end dependencies.
99 98
100To get the latest changes from the `master` branch: 99To get the latest changes from the `master` branch:
diff --git a/doc/md/FAQ.md b/doc/md/FAQ.md
index 77faf117..a2ec7d57 100644
--- a/doc/md/FAQ.md
+++ b/doc/md/FAQ.md
@@ -22,7 +22,9 @@ With Shaarli:
22Shaarli stands for _shaaring_ your _links_. 22Shaarli stands for _shaaring_ your _links_.
23 23
24### My Shaarli is broken! 24### My Shaarli is broken!
25First of all, ensure that both the [web server](Server-configuration) and [Shaarli](Shaarli-configuration) are correctly configured, and that your installation is [supported](Server-requirements). 25First of all, ensure that both the [web server](Server-configuration) and
26[Shaarli](Shaarli-configuration) are correctly configured, and that your
27installation is [supported](Server-configuration).
26 28
27If everything looks right but the issue(s) remain(s), please: 29If everything looks right but the issue(s) remain(s), please:
28 30
diff --git a/doc/md/REST-API.md b/doc/md/REST-API.md
index 68a83c00..c016de56 100644
--- a/doc/md/REST-API.md
+++ b/doc/md/REST-API.md
@@ -3,8 +3,9 @@
3See the [REST API documentation](http://shaarli.github.io/api-documentation/) 3See the [REST API documentation](http://shaarli.github.io/api-documentation/)
4for a list of available endpoints and parameters. 4for a list of available endpoints and parameters.
5 5
6Please ensure that your server meets the [requirements](Server-requirements) 6Please ensure that your server meets the
7and is properly [configured](Server-configuration): 7[requirements](Server-configuration#prerequisites) and is properly
8[configured](Server-configuration):
8 9
9- URL rewriting is enabled (see specific Apache and Nginx sections) 10- URL rewriting is enabled (see specific Apache and Nginx sections)
10- the server's timezone is properly defined 11- the server's timezone is properly defined
diff --git a/doc/md/Server-configuration.md b/doc/md/Server-configuration.md
index 25dd49fe..ca82b2ec 100644
--- a/doc/md/Server-configuration.md
+++ b/doc/md/Server-configuration.md
@@ -1,139 +1,130 @@
1*Example virtual host configurations for popular web servers*
2 1
2- [Prerequisites](#prerequisistes)
3- [Apache](#apache) 3- [Apache](#apache)
4- [Nginx](#nginx) 4- [Nginx](#nginx)
5- [Proxies](#proxies)
6- [See also](#see-also)
5 7
6## Prerequisites 8## Prerequisites
7### Shaarli 9### Shaarli
8- Shaarli is installed in a directory readable/writeable by the user
9- the correct read/write permissions have been granted to the web server _user and/or group_
10- for HTTPS / SSL:
11 - a key pair (public, private) and a certificate have been generated
12 - the appropriate server SSL extension is installed and active
13 10
14### HTTPS, TLS and self-signed certificates 11- A web server and PHP interpreter module/service have been installed.
15Related guides: 12- You have write access to the Shaarli installation directory.
13- The correct read/write permissions have been granted to the web server user and group.
14- Your PHP interpreter is compatible with supported PHP versions:
16 15
17- [How to Create Self-Signed SSL Certificates with OpenSSL](http://www.xenocafe.com/tutorials/linux/centos/openssl/self_signed_certificates/index.php) 16Version | Status | Shaarli compatibility
18- [How do I create my own Certificate Authority?](https://workaround.org/certificate-authority) 17:---:|:---:|:---:
19- Generate a self-signed certificate (will trigger browser warnings) with apache2: 187.2 | Supported | Yes
20 `make-ssl-cert generate-default-snakeoil --force-overwrite` will create `/etc/ssl/certs/ssl-cert-snakeoil.pem` and `/etc/ssl/private/ssl-cert-snakeoil.key` 197.1 | Supported | Yes
207.0 | Supported | Yes
215.6 | Supported | Yes
225.5 | EOL: 2016-07-10 | Yes
235.4 | EOL: 2015-09-14 | Yes (up to Shaarli 0.8.x)
245.3 | EOL: 2014-08-14 | Yes (up to Shaarli 0.8.x)
21 25
22### Proxies 26- The following PHP extensions are installed on the server:
23If Shaarli is served behind a proxy (i.e. there is a proxy server between clients and the web server hosting Shaarli), please refer to the proxy server documentation for proper configuration. In particular, you have to ensure that the following server variables are properly set:
24 27
25- `X-Forwarded-Proto` 28Extension | Required? | Usage
26- `X-Forwarded-Host` 29---|:---:|---
27- `X-Forwarded-For` 30[`openssl`](http://php.net/manual/en/book.openssl.php) | All | OpenSSL, HTTPS
31[`php-mbstring`](http://php.net/manual/en/book.mbstring.php) | CentOS, Fedora, RHEL, Windows, some hosting providers | multibyte (Unicode) string support
32[`php-gd`](http://php.net/manual/en/book.image.php) | optional | thumbnail resizing
33[`php-intl`](http://php.net/manual/en/book.intl.php) | optional | localized text sorting (e.g. `e->è->f`)
34[`php-curl`](http://php.net/manual/en/book.curl.php) | optional | using cURL for fetching webpages and thumbnails in a more robust way
35[`php-gettext`](http://php.net/manual/en/book.gettext.php) | optional | Use the translation system in gettext mode (faster)
28 36
29See also [proxy-related](https://github.com/shaarli/Shaarli/issues?utf8=%E2%9C%93&q=label%3Aproxy+) issues. 37--------------------------------------------------------------------------------
30 38
31## Apache 39### SSL/TLS configuration
32### Minimal
33```apache
34<VirtualHost *:80>
35 ServerName shaarli.my-domain.org
36 DocumentRoot /absolute/path/to/shaarli/
37</VirtualHost>
38```
39### Debug - Log all the things!
40This configuration will log both Apache and PHP errors, which may prove useful to identify server configuration errors.
41 40
42See: 41To setup HTTPS / SSL on your webserver (recommended), you must generate a public/private **key pair** and a **certificate**, and install, configure and activate the appropriate **webserver SSL extension**.
43 42
44- [Apache/PHP - error log per VirtualHost](http://stackoverflow.com/q/176) (StackOverflow) 43#### Let's Encrypt
45- [PHP: php_value vs php_admin_value and the use of php_flag explained](https://ma.ttias.be/php-php_value-vs-php_admin_value-and-the-use-of-php_flag-explained/)
46 44
47```apache 45[Let's Encrypt](https://en.wikipedia.org/wiki/Let%27s_Encrypt) is a certificate authority that provides free TLS/X.509 certificates via an automated process.
48<VirtualHost *:80>
49 ServerName shaarli.my-domain.org
50 DocumentRoot /absolute/path/to/shaarli/
51 46
52 LogLevel warn 47 * Install `certbot` using the appropriate method described on https://certbot.eff.org/.
53 ErrorLog /var/log/apache2/shaarli-error.log 48
54 CustomLog /var/log/apache2/shaarli-access.log combined 49Location of the `certbot` program and template configuration files may vary depending on which installation method was used. Change the file paths below accordingly. Here is an easy way to create a signed certificate using `certbot`, it assumes `certbot` was installed through APT on a Debian-based distribution:
55 50
56 php_flag log_errors on 51 * Stop the apache2/nginx service.
57 php_flag display_errors on 52 * Run `certbot --agree-tos --standalone --preferred-challenges tls-sni --email "youremail@example.com" --domain yourdomain.example.com`
58 php_value error_reporting 2147483647 53 * For the Apache webserver, copy `/usr/lib/python2.7/dist-packages/certbot_apache/options-ssl-apache.conf` to `/etc/letsencrypt/options-ssl-apache.conf` (paths may vary depending on installation method)
59 php_value error_log /var/log/apache2/shaarli-php-error.log 54 * For Nginx: TODO
60</VirtualHost> 55 * Setup your webserver as described below
61``` 56 * Restart the apache2/nginx service.
57
58#### Self-signed certificates
59
60If you don't want to request a certificate from Let's Encrypt, or are unable to (for example, webserver on a LAN, or domain name not registered in the public DNS system), you can generate a self-signed certificate. This certificate will trigger security warnings in web browsers, unless you add it to the browser's SSL store manually.
61
62* Apache: run `make-ssl-cert generate-default-snakeoil --force-overwrite`
63* Nginx: TODO
64
65--------------------------------------------------------------------------------
66
67## Apache
68
69Here is a basic configuration example for the Apache web server with `mod_php`.
70
71In `/etc/apache2/sites-available/shaarli.conf`:
62 72
63### Standard - Keep access and error logs
64```apache 73```apache
65<VirtualHost *:80> 74<VirtualHost *:443>
66 ServerName shaarli.my-domain.org 75 ServerName shaarli.my-domain.org
67 DocumentRoot /absolute/path/to/shaarli/ 76 DocumentRoot /absolute/path/to/shaarli/
68 77
78 # Logging
79 # Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
69 LogLevel warn 80 LogLevel warn
70 ErrorLog /var/log/apache2/shaarli-error.log 81 ErrorLog /var/log/apache2/shaarli-error.log
71 CustomLog /var/log/apache2/shaarli-access.log combined 82 CustomLog /var/log/apache2/shaarli-access.log combined
72</VirtualHost>
73```
74 83
75### Paranoid - Redirect HTTP (:80) to HTTPS (:443) 84 # Let's Encrypt SSL configuration (recommended)
76See [Server-side TLS](https://wiki.mozilla.org/Security/Server_Side_TLS#Apache) (Mozilla). 85 SSLEngine on
86 SSLCertificateFile /etc/letsencrypt/live/yourdomain.example.com/fullchain.pem
87 SSLCertificateKeyFile /etc/letsencrypt/live/yourdomain.example.com/privkey.pem
88 Include /etc/letsencrypt/options-ssl-apache.conf
77 89
78```apache 90 # Self-signed SSL cert configuration
79<VirtualHost *:443> 91 #SSLEngine on
80 ServerName shaarli.my-domain.org 92 #SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
81 DocumentRoot /absolute/path/to/shaarli/ 93 #SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
82 94
83 SSLEngine on 95 # Optional, log PHP errors, useful for debugging
84 SSLCertificateFile /absolute/path/to/the/website/certificate.pem 96 #php_flag log_errors on
85 SSLCertificateKeyFile /absolute/path/to/the/website/key.key 97 #php_flag display_errors on
98 #php_value error_reporting 2147483647
99 #php_value error_log /var/log/apache2/shaarli-php-error.log
86 100
87 <Directory /absolute/path/to/shaarli/> 101 <Directory /absolute/path/to/shaarli/>
102 #Required for .htaccess support
88 AllowOverride All 103 AllowOverride All
89 Options Indexes FollowSymLinks MultiViews
90 Order allow,deny 104 Order allow,deny
91 allow from all 105 Allow from all
92 </Directory>
93 106
94 LogLevel warn 107 Options Indexes FollowSymLinks MultiViews #TODO is Indexes/Multiviews required?
95 ErrorLog /var/log/apache2/shaarli-error.log 108
96 CustomLog /var/log/apache2/shaarli-access.log combined 109 # Optional - required for playvideos plugin
97</VirtualHost> 110 #Header set Content-Security-Policy "script-src 'self' 'unsafe-inline' https://www.youtube.com https://s.ytimg.com 'unsafe-eval'"
98<VirtualHost *:80> 111 </Directory>
99 ServerName shaarli.my-domain.org
100 Redirect 301 / https://shaarli.my-domain.org
101 112
102 LogLevel warn
103 ErrorLog /var/log/apache2/shaarli-error.log
104 CustomLog /var/log/apache2/shaarli-access.log combined
105</VirtualHost> 113</VirtualHost>
106``` 114```
107 115
108### .htaccess 116Enable this configuration with `sudo a2ensite shaarli`
109 117
110Shaarli use `.htaccess` Apache files to deny access to files that shouldn't be directly accessed (datastore, config, etc.). You need the directive `AllowOverride All` in your virtual host configuration for them to work. 118_Note: If you use Apache 2.2 or lower, you need [mod_version](https://httpd.apache.org/docs/current/mod/mod_version.html) to be installed and enabled._
111 119
112**Warning**: If you use Apache 2.2 or lower, you need [mod_version](https://httpd.apache.org/docs/current/mod/mod_version.html) to be installed and enabled. 120_Note: Apache module `mod_rewrite` must be enabled to use the REST API._
113
114Apache module `mod_rewrite` **must** be enabled to use the REST API. URL rewriting rules for the Slim microframework are stated in the root `.htaccess` file.
115 121
116## LightHttpd
117 122
118## Nginx 123## Nginx
119### Foreword
120Nginx does not natively interpret PHP scripts; to this effect, we will run a [FastCGI](https://en.wikipedia.org/wiki/FastCGI) service, to which Nginx's FastCGI module will proxy all requests to PHP resources.
121
122Required packages:
123 124
124- [nginx](http://nginx.org) 125Here is a basic configuration example for the Nginx web server, using the [php-fpm](http://php-fpm.org) PHP FastCGI Process Manager, and Nginx's [FastCGI](https://en.wikipedia.org/wiki/FastCGI) module.
125- [php-fpm](http://php-fpm.org) - PHP FastCGI Process Manager
126 126
127Official documentation: 127<!--- TODO refactor everything below this point --->
128
129- [Beginner's guide](http://nginx.org/en/docs/beginners_guide.html)
130- [ngx_http_fastcgi_module](http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html)
131- [Pitfalls](http://wiki.nginx.org/Pitfalls)
132
133Community resources:
134
135- [Server-side TLS (Nginx)](https://wiki.mozilla.org/Security/Server_Side_TLS#Nginx) (Mozilla)
136- [PHP configuration examples](http://kbeezie.com/nginx-configuration-examples/) (Karl Blessing)
137 128
138### Common setup 129### Common setup
139Once Nginx and PHP-FPM are installed, we need to ensure: 130Once Nginx and PHP-FPM are installed, we need to ensure:
@@ -404,3 +395,39 @@ http {
404 } 395 }
405} 396}
406``` 397```
398
399## Proxies
400If Shaarli is served behind a proxy (i.e. there is a proxy server between clients and the web server hosting Shaarli), please refer to the proxy server documentation for proper configuration. In particular, you have to ensure that the following server variables are properly set:
401
402- `X-Forwarded-Proto`
403- `X-Forwarded-Host`
404- `X-Forwarded-For`
405
406See also [proxy-related](https://github.com/shaarli/Shaarli/issues?utf8=%E2%9C%93&q=label%3Aproxy+) issues.
407
408
409## See also
410
411 * [Server security](Server-security.md)
412
413#### Webservers
414
415- [Apache/PHP - error log per VirtualHost](http://stackoverflow.com/q/176) (StackOverflow)
416- [Apache - PHP: php_value vs php_admin_value and the use of php_flag explained](https://ma.ttias.be/php-php_value-vs-php_admin_value-and-the-use-of-php_flag-explained/)
417- [Server-side TLS (Apache)](https://wiki.mozilla.org/Security/Server_Side_TLS#Apache) (Mozilla)
418- [Nginx Beginner's guide](http://nginx.org/en/docs/beginners_guide.html)
419- [Nginx ngx_http_fastcgi_module](http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html)
420- [Nginx Pitfalls](http://wiki.nginx.org/Pitfalls)
421- [Nginx PHP configuration examples](http://kbeezie.com/nginx-configuration-examples/) (Karl Blessing)
422- [Server-side TLS (Nginx)](https://wiki.mozilla.org/Security/Server_Side_TLS#Nginx) (Mozilla)
423- [How to Create Self-Signed SSL Certificates with OpenSSL](http://www.xenocafe.com/tutorials/linux/centos/openssl/self_signed_certificates/index.php)
424- [How do I create my own Certificate Authority?](https://workaround.org/certificate-authority)
425
426#### PHP
427
428- [Travis configuration](https://github.com/shaarli/Shaarli/blob/master/.travis.yml)
429- [PHP: Supported versions](http://php.net/supported-versions.php)
430- [PHP: Unsupported versions](http://php.net/eol.php) _(EOL - End Of Life)_
431- [PHP 7 Changelog](http://php.net/ChangeLog-7.php)
432- [PHP 5 Changelog](http://php.net/ChangeLog-5.php)
433- [PHP: Bugs](https://bugs.php.net/)
diff --git a/doc/md/Server-requirements.md b/doc/md/Server-requirements.md
deleted file mode 100644
index 2dc442df..00000000
--- a/doc/md/Server-requirements.md
+++ /dev/null
@@ -1,42 +0,0 @@
1## PHP
2
3### Release information
4- [PHP: Supported versions](http://php.net/supported-versions.php)
5- [PHP: Unsupported versions](http://php.net/eol.php) _(EOL - End Of Life)_
6- [PHP 7 Changelog](http://php.net/ChangeLog-7.php)
7- [PHP 5 Changelog](http://php.net/ChangeLog-5.php)
8- [PHP: Bugs](https://bugs.php.net/)
9
10### Supported versions
11Version | Status | Shaarli compatibility
12:---:|:---:|:---:
137.1 | Supported (v0.9.x) | Yes
147.0 | Supported | Yes
155.6 | Supported | Yes
165.5 | EOL: 2016-07-10 | Yes
175.4 | EOL: 2015-09-14 | Yes (up to Shaarli 0.8.x)
185.3 | EOL: 2014-08-14 | Yes (up to Shaarli 0.8.x)
19
20See also:
21
22- [Travis configuration](https://github.com/shaarli/Shaarli/blob/master/.travis.yml)
23
24### Dependency management
25Starting with Shaarli `v0.8.x`, [Composer](https://getcomposer.org/) is used to resolve,
26download and install third-party PHP dependencies.
27
28Library | Required? | Usage
29---|:---:|---
30[`shaarli/netscape-bookmark-parser`](https://packagist.org/packages/shaarli/netscape-bookmark-parser) | All | Import bookmarks from Netscape files
31[`erusev/parsedown`](https://packagist.org/packages/erusev/parsedown) | All | Parse MarkDown syntax for the MarkDown plugin
32[`slim/slim`](https://packagist.org/packages/slim/slim) | All | Handle routes and middleware for the REST API
33
34### Extensions
35Extension | Required? | Usage
36---|:---:|---
37[`openssl`](http://php.net/manual/en/book.openssl.php) | All | OpenSSL, HTTPS
38[`php-mbstring`](http://php.net/manual/en/book.mbstring.php) | CentOS, Fedora, RHEL, Windows, some hosting providers | multibyte (Unicode) string support
39[`php-gd`](http://php.net/manual/en/book.image.php) | optional | thumbnail resizing
40[`php-intl`](http://php.net/manual/en/book.intl.php) | optional | localized text sorting (e.g. `e->è->f`)
41[`php-curl`](http://php.net/manual/en/book.curl.php) | optional | using cURL for fetching webpages and thumbnails in a more robust way
42[`php-gettext`](http://php.net/manual/en/book.gettext.php) | optional | Use the translation system in gettext mode (faster)
diff --git a/doc/md/Sharing-content.md b/doc/md/Sharing-content.md
index faacc1f9..4910ff6c 100644
--- a/doc/md/Sharing-content.md
+++ b/doc/md/Sharing-content.md
@@ -1,4 +1,4 @@
1Content posted to Shaarli is separated in items called _Shaares_. For each Shaare, 1Content posted to Shaarli is separated in items called _Shaares_. For each Shaare,
2you can customize the following aspects: 2you can customize the following aspects:
3 3
4 * URL to link to 4 * URL to link to
@@ -13,10 +13,10 @@ you can customize the following aspects:
13 13
14While logged in to your Shaarli, you can add new Shaares in several ways: 14While logged in to your Shaarli, you can add new Shaares in several ways:
15 15
16 * [+Shaare button] 16 * [+Shaare button](#shaare-button)
17 * [Bookmarklet] 17 * [Bookmarklet](#bookmarklet)
18 * [Firefox Share](#firefox-share) 18 * [Firefox Share](#firefox-share)
19 * Third-party [apps and browser addons](Community-\&-Related-software.md#mobile-apps) 19 * Third-party [apps and browser addons](Community-&-Related-software.md#mobile-apps)
20 * [REST API](https://shaarli.github.io/api-documentation/) 20 * [REST API](https://shaarli.github.io/api-documentation/)
21 21
22### +Shaare button 22### +Shaare button
@@ -33,14 +33,14 @@ While logged in to your Shaarli, you can add new Shaares in several ways:
33 33
34### Bookmarklet 34### Bookmarklet
35 35
36The _Bookmarklet_ \[[1](https://en.wikipedia.org/wiki/Bookmarklet)\] is a special 36The _Bookmarklet_ \[[1](https://en.wikipedia.org/wiki/Bookmarklet)\] is a special
37browser bookmark you can use to add new content to your Shaarli. This bookmarklet is 37browser bookmark you can use to add new content to your Shaarli. This bookmarklet is
38compatible with Firefox, Opera, Chrome and Safari. To set it up: 38compatible with Firefox, Opera, Chrome and Safari. To set it up:
39 39
40 * Access the `Tools` page from the button in the toolbar. 40 * Access the `Tools` page from the button in the toolbar.
41 * Drag the **`✚Shaare link` button** to your browser's bookmarks bar. 41 * Drag the **`✚Shaare link` button** to your browser's bookmarks bar.
42 42
43Once this is done, you can shaare any URL you are visiting simply by clicking the 43Once this is done, you can shaare any URL you are visiting simply by clicking the
44bookmarklet in your browser! The same `New Shaare` dialog as above is displayed. 44bookmarklet in your browser! The same `New Shaare` dialog as above is displayed.
45 45
46| Note | Websites which enforce Content Security Policy (CSP), such as github.com, disallow usage of bookmarklets. Unfortunately, there is nothing Shaarli can do about it. \[[1](https://github.com/shaarli/Shaarli/issues/196)]\ \[[2](https://bugzilla.mozilla.org/show_bug.cgi?id=866522)]\ \[[3](https://code.google.com/p/chromium/issues/detail?id=233903)]\ | 46| Note | Websites which enforce Content Security Policy (CSP), such as github.com, disallow usage of bookmarklets. Unfortunately, there is nothing Shaarli can do about it. \[[1](https://github.com/shaarli/Shaarli/issues/196)]\ \[[2](https://bugzilla.mozilla.org/show_bug.cgi?id=866522)]\ \[[3](https://code.google.com/p/chromium/issues/detail?id=233903)]\ |
@@ -59,8 +59,8 @@ Before using Firefox Share, you must first add Shaarli as a sharing provider:
59- Click the `Tools` button in the top bar 59- Click the `Tools` button in the top bar
60- Click the `✚Add to Firefox social` button and accept the activation. 60- Click the `✚Add to Firefox social` button and accept the activation.
61 61
62Once this is done, you can share any URL you are visiting by clicking the Firefox 62Once this is done, you can share any URL you are visiting by clicking the Firefox
63_Share_ button [images/firefoxshare.png](images/firefoxshare.png) 63_Share_ button ![images/firefoxshare.png](images/firefoxshare.png)
64 64
65| Note | Firefox Share is no longer available for Firefox 57 and later versions. | 65| Note | Firefox Share is no longer available for Firefox 57 and later versions. |
66|---------|---------| 66|---------|---------|
@@ -74,15 +74,15 @@ _Share_ button [images/firefoxshare.png](images/firefoxshare.png)
74 74
75Any Shaare can edited by clicking its ![](images/edit_icon.png) `Edit` button. 75Any Shaare can edited by clicking its ![](images/edit_icon.png) `Edit` button.
76 76
77Editing a Shaare will not change it's permalink, each permalink always points to the 77Editing a Shaare will not change it's permalink, each permalink always points to the
78latest revision of a Shaare. 78latest revision of a Shaare.
79 79
80-------------------------------------------------------------------------------- 80--------------------------------------------------------------------------------
81 81
82## Using shaarli as a blog, notepad, pastebin... 82## Using shaarli as a blog, notepad, pastebin...
83 83
84While adding or editing a link, leave the URL field blank to create a text-only 84While adding or editing a link, leave the URL field blank to create a text-only
85("note") post. This allows you to post any kind of text content, such as blog 85("note") post. This allows you to post any kind of text content, such as blog
86articles, private or public notes, snippets... There is no character limit! You can 86articles, private or public notes, snippets... There is no character limit! You can
87access your Shaare from its permalink. 87access your Shaare from its permalink.
88 88
diff --git a/doc/md/Unit-tests-Docker.md b/doc/md/Unit-tests-Docker.md
index c2de7cc7..59bd5b45 100644
--- a/doc/md/Unit-tests-Docker.md
+++ b/doc/md/Unit-tests-Docker.md
@@ -8,7 +8,7 @@ Read first:
8 8
9### Docker test images 9### Docker test images
10 10
11Test Dockerfiles are located under `docker/tests/<distribution>/Dockerfile`, 11Test Dockerfiles are located under `tests/docker/<distribution>/Dockerfile`,
12and can be used to build Docker images to run Shaarli test suites under common 12and can be used to build Docker images to run Shaarli test suites under common
13Linux environments. 13Linux environments.
14 14
@@ -27,7 +27,7 @@ What's behind the curtains:
27 - test PHP dependencies (OS packages) 27 - test PHP dependencies (OS packages)
28 - Composer 28 - Composer
29- the local workspace is mapped to the container's `/shaarli/` directory, 29- the local workspace is mapped to the container's `/shaarli/` directory,
30- the files are rsync'd to so tests are run using a standard Linux user account 30- the files are rsync'd so tests are run using a standard Linux user account
31 (running tests as `root` would bypass permission checks and may hide issues) 31 (running tests as `root` would bypass permission checks and may hide issues)
32- the tests are run inside the container. 32- the tests are run inside the container.
33 33
@@ -36,7 +36,7 @@ What's behind the curtains:
36```bash 36```bash
37# build the Debian 9 Docker image 37# build the Debian 9 Docker image
38$ cd /path/to/shaarli 38$ cd /path/to/shaarli
39$ cd docker/test/debian9 39$ cd tests/docker/debian9
40$ docker build -t shaarli-test:debian9 . 40$ docker build -t shaarli-test:debian9 .
41``` 41```
42 42
diff --git a/doc/md/docker/shaarli-images.md b/doc/md/docker/shaarli-images.md
index 12f7b5d1..5948949a 100644
--- a/doc/md/docker/shaarli-images.md
+++ b/doc/md/docker/shaarli-images.md
@@ -8,9 +8,9 @@ The images can be found in the [`shaarli/shaarli`](https://hub.docker.com/r/shaa
8repository. 8repository.
9 9
10### Available image tags 10### Available image tags
11- `latest`: latest branch (tarball release) 11- `latest`: latest branch
12- `master`: master branch (tarball release) 12- `master`: master branch
13- `stable`: stable branch (tarball release) 13- `stable`: stable branch
14 14
15The `latest` and `master` images rely on: 15The `latest` and `master` images rely on:
16 16
@@ -24,11 +24,18 @@ The `stable` image relies on:
24- [PHP5-FPM](http://php-fpm.org/) 24- [PHP5-FPM](http://php-fpm.org/)
25- [Nginx](http://nginx.org/) 25- [Nginx](http://nginx.org/)
26 26
27Additional [Dockerfiles](https://github.com/shaarli/Shaarli/tree/master/docker) are provided for the `arm32v7` platform, relying on [Linuxserver.io Alpine armhf images](https://hub.docker.com/r/lsiobase/alpine.armhf/). These images must be built using [`docker build`](https://docs.docker.com/engine/reference/commandline/build/) on an `arm32v7` machine or using an emulator such as [qemu](https://resin.io/blog/building-arm-containers-on-any-x86-machine-even-dockerhub/). 27Additional Dockerfiles are provided for the `arm32v7` platform, relying on
28[Linuxserver.io Alpine armhf
29images](https://hub.docker.com/r/lsiobase/alpine.armhf/). These images must be
30built using [`docker
31build`](https://docs.docker.com/engine/reference/commandline/build/) on an
32`arm32v7` machine or using an emulator such as
33[qemu](https://resin.io/blog/building-arm-containers-on-any-x86-machine-even-dockerhub/).
28 34
29### Download from DockerHub 35### Download from Docker Hub
30```bash 36```shell
31$ docker pull shaarli/shaarli 37$ docker pull shaarli/shaarli
38
32latest: Pulling from shaarli/shaarli 39latest: Pulling from shaarli/shaarli
3332716d9fcddb: Pull complete 4032716d9fcddb: Pull complete
3484899d045435: Pull complete 4184899d045435: Pull complete
@@ -46,7 +53,7 @@ Status: Downloaded newer image for shaarli/shaarli:latest
46``` 53```
47 54
48### Create and start a new container from the image 55### Create and start a new container from the image
49```bash 56```shell
50# map the host's :8000 port to the container's :80 port 57# map the host's :8000 port to the container's :80 port
51$ docker create -p 8000:80 shaarli/shaarli 58$ docker create -p 8000:80 shaarli/shaarli
52d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101 59d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101
@@ -62,7 +69,7 @@ d40b7af693d6 shaarli/shaarli /usr/bin/supervisor 15 seconds ago Up 4 seconds
62``` 69```
63 70
64### Stop and destroy a container 71### Stop and destroy a container
65```bash 72```shell
66$ docker stop backstabbing_galileo # those docker guys are really rude to physicists! 73$ docker stop backstabbing_galileo # those docker guys are really rude to physicists!
67backstabbing_galileo 74backstabbing_galileo
68 75
@@ -84,12 +91,34 @@ CONTAINER ID IMAGE COMMAND CREATED STATUS
84``` 91```
85 92
86### Automatic builds 93### Automatic builds
94Docker users can start a personal instance from an
95[autobuild image](https://hub.docker.com/r/shaarli/shaarli/).
96For example to start a temporary Shaarli at ``localhost:8000``, and keep session
97data (config, storage):
87 98
88Docker users can start a personal instance from an [autobuild image](https://hub.docker.com/r/shaarli/shaarli/). For example to start a temporary Shaarli at ``localhost:8000``, and keep session data (config, storage): 99```shell
89```
90MY_SHAARLI_VOLUME=$(cd /path/to/shaarli/data/ && pwd -P) 100MY_SHAARLI_VOLUME=$(cd /path/to/shaarli/data/ && pwd -P)
91docker run -ti --rm \ 101docker run -ti --rm \
92 -p 8000:80 \ 102 -p 8000:80 \
93 -v $MY_SHAARLI_VOLUME:/var/www/shaarli/data \ 103 -v $MY_SHAARLI_VOLUME:/var/www/shaarli/data \
94 shaarli/shaarli 104 shaarli/shaarli
95``` 105```
106
107### Volumes and data persistence
108Data can be persisted by [using volumes](https://docs.docker.com/storage/volumes/).
109Volumes allow to keep your data when renewing and/or updating container images:
110
111```shell
112# Create data volumes
113$ docker volume create shaarli-data
114$ docker volume create shaarli-cache
115
116# Create and start a Shaarli container using these volumes to persist data
117$ docker create \
118 --name shaarli \
119 -v shaarli-cache:/var/www/shaarli/cache \
120 -v shaarli-data:/var/www/shaarli/data \
121 -p 8000:80 \
122 shaarli/shaarli:master
123$ docker start shaarli
124```
diff --git a/doc/md/index.md b/doc/md/index.md
index 224070cb..c18332b4 100644
--- a/doc/md/index.md
+++ b/doc/md/index.md
@@ -1,19 +1,27 @@
1# [Shaarli](https://github.com/shaarli/Shaarli/) documentation 1# [Shaarli](https://github.com/shaarli/Shaarli/) documentation
2 2
3Here you can find some info on how to use, configure, tweak and solve problems with your Shaarli. 3The personal, minimalist, super-fast, database free, bookmarking service.
4
5Do you want to share the links you discover?
6Shaarli is a minimalist link sharing service that you can install on your own server.
7It is designed to be personal (single-user), fast and handy.
8
9<!-- TODO screenshots -->
4 10
5For general info, read the [README](https://github.com/shaarli/Shaarli/blob/master/README.md). 11Here you can find some info on how to use, configure, tweak and solve problems with your Shaarli.
12For general information, read the [README](https://github.com/shaarli/Shaarli/blob/master/README.md).
6 13
7If you have any questions or ideas, please join the [chat](https://gitter.im/shaarli/Shaarli) (also reachable via [IRC](https://irc.gitter.im/)), post them in our [general discussion](https://github.com/shaarli/Shaarli/issues/308) or read the current [issues](https://github.com/shaarli/Shaarli/issues). 14If you have any questions or ideas, please join the [chat](https://gitter.im/shaarli/Shaarli) (also reachable via [IRC](https://irc.gitter.im/)), post them in our [general discussion](https://github.com/shaarli/Shaarli/issues/308) or read the current [issues](https://github.com/shaarli/Shaarli/issues).
15
8If you've found a bug, please create a [new issue](https://github.com/shaarli/Shaarli/issues/new). 16If you've found a bug, please create a [new issue](https://github.com/shaarli/Shaarli/issues/new).
9 17
10If you would like a feature added to Shaarli, check the issues labeled [`feature`](https://github.com/shaarli/Shaarli/labels/feature), [`enhancement`](https://github.com/shaarli/Shaarli/labels/enhancement), and [`plugin`](https://github.com/shaarli/Shaarli/labels/plugin). 18If you would like a feature added to Shaarli, check the issues labeled [`feature`](https://github.com/shaarli/Shaarli/labels/feature), [`enhancement`](https://github.com/shaarli/Shaarli/labels/enhancement), and [`plugin`](https://github.com/shaarli/Shaarli/labels/plugin).
11 19
12_Note: This documentation is available online at https://shaarli.readthedocs.io/, and locally in the `doc/html/` directory of your Shaarli installation._ 20* [GitHub project page](https://github.com/shaarli/Shaarli)
21* [Online documentation](https://shaarli.readthedocs.io/) (this page)
22* [Latest Shaarli releases](https://github.com/shaarli/Shaarli/releases)
23* [Changelog](https://github.com/shaarli/Shaarli/blob/master/CHANGELOG.md)
13 24
14[![Join the chat at https://gitter.im/shaarli/Shaarli](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/shaarli/Shaarli)
15[![Bountysource](https://www.bountysource.com/badge/team?team_id=19583&style=bounties_received)](https://www.bountysource.com/teams/shaarli/issues)
16[![Docker repository](https://img.shields.io/docker/pulls/shaarli/shaarli.svg)](https://hub.docker.com/r/shaarli/shaarli/)
17 25
18### Demo 26### Demo
19 27
@@ -22,6 +30,9 @@ It runs the latest development version of Shaarli and is updated/reset daily.
22 30
23Login: `demo`; Password: `demo` 31Login: `demo`; Password: `demo`
24 32
33<!-- TODO review everything below this point -->
34
35
25## Features 36## Features
26 37
27Shaarli can be used: 38Shaarli can be used:
@@ -42,26 +53,31 @@ Shaarli can be used:
42- to feed other social networks, blogs... using RSS feeds and external services (dlvr.it, ifttt.com ...). 53- to feed other social networks, blogs... using RSS feeds and external services (dlvr.it, ifttt.com ...).
43 54
44### Interface 55### Interface
56
45- minimalist design (simple is beautiful) 57- minimalist design (simple is beautiful)
46- FAST 58- FAST
47- ATOM and RSS feeds 59- ATOM and RSS feeds
48- views: 60- views:
49 - paginated link list 61 - paginated link list (with image and video thumbnails)
50 - tag cloud 62 - tag cloud
51 - picture wall: image and video thumbnails 63 - picture wall: image and video thumbnails (with lazy loading)
52 - daily: newspaper-like daily digest 64 - daily: newspaper-like daily digest
53 - daily RSS feed 65 - daily RSS feed
54- permalinks for easy reference 66- permalinks for easy reference
55- links can be public or private 67- links can be public or private
68- thumbnail generation for images and video services
69- URL cleanup: automatic removal of `?utm_source=...`, `fb=...`
56- extensible through [plugins](https://shaarli.readthedocs.io/en/master/Plugins/#plugin-usage) 70- extensible through [plugins](https://shaarli.readthedocs.io/en/master/Plugins/#plugin-usage)
57 71
58### Tag, view and search your links! 72### Tag, view and search your links
73
59- add a custom title and description to archived links 74- add a custom title and description to archived links
60- add tags to classify and search links 75- add tags to classify and search links
61 - features tag autocompletion, renaming, merging and deletion 76 - features tag autocompletion, renaming, merging and deletion
62- full-text and tag search 77- full-text and tag search
63 78
64### Easy setup 79### Easy setup
80
65- dead-simple installation: drop the files, open the page 81- dead-simple installation: drop the files, open the page
66- links are stored in a file 82- links are stored in a file
67 - compact storage 83 - compact storage
@@ -70,23 +86,19 @@ Shaarli can be used:
70- import and export links as Netscape bookmarks 86- import and export links as Netscape bookmarks
71 87
72### Accessibility 88### Accessibility
73- Firefox bookmarlet to share links in one click 89
90- bookmarlet to share links in one click
74- support for mobile browsers 91- support for mobile browsers
75- works with Javascript disabled 92- degrades gracefully with Javascript disabled
76- easy page customization through HTML/CSS/RainTPL 93- easy page customization through HTML/CSS/RainTPL
77 94
78### Security 95### Security
79- bruteforce-proof login form 96
80- protected against [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery)
81and session cookie hijacking
82
83### Goodies
84- thumbnail generation for images and video services:
85dailymotion, flickr, imageshack, imgur, vimeo, xkcd, youtube...
86 - lazy-loading with [bLazy](http://dinbror.dk/blazy/)
87- [PubSubHubbub](https://code.google.com/p/pubsubhubbub/) protocol support
88- URL cleanup: automatic removal of `?utm_source=...`, `fb=...`
89- discreet pop-up notification when a new release is available 97- discreet pop-up notification when a new release is available
98- bruteforce protection on the login form
99- protected against [XSRF](http://en.wikipedia.org/wiki/Cross-site_request_forgery) and session cookie hijacking
100
101<!-- TODO Limitations -->
90 102
91### REST API 103### REST API
92 104
@@ -95,28 +107,39 @@ Easily extensible by any client using the REST API exposed by Shaarli.
95See the [API documentation](http://shaarli.github.io/api-documentation/). 107See the [API documentation](http://shaarli.github.io/api-documentation/).
96 108
97## About 109## About
110
98### Shaarli community fork 111### Shaarli community fork
112
99This friendly fork is maintained by the Shaarli community at https://github.com/shaarli/Shaarli 113This friendly fork is maintained by the Shaarli community at https://github.com/shaarli/Shaarli
100 114
101This is a community fork of the original [Shaarli](https://github.com/sebsauvage/Shaarli/) project by [Sébastien Sauvage](http://sebsauvage.net/). 115This is a community fork of the original [Shaarli](https://github.com/sebsauvage/Shaarli/) project by [Sébastien Sauvage](http://sebsauvage.net/).
102 116
103The original project is currently unmaintained, and the developer [has informed us](https://github.com/sebsauvage/Shaarli/issues/191) 117The original project is currently unmaintained, and the developer [has informed us](https://github.com/sebsauvage/Shaarli/issues/191) that he would have no time to work on Shaarli in the near future.
104that he would have no time to work on Shaarli in the near future. 118
105The Shaarli community has carried on the work to provide 119The Shaarli community has carried on the work to provide [many
106[many patches](https://github.com/shaarli/Shaarli/compare/sebsauvage:master...master) 120patches](https://github.com/shaarli/Shaarli/compare/sebsauvage:master...master) for
107for [bug fixes and enhancements](https://github.com/shaarli/Shaarli/issues?q=is%3Aclosed+) 121[bug fixes and enhancements](https://github.com/shaarli/Shaarli/issues?q=is%3Aclosed+)
108in this repository, and will keep maintaining the project for the foreseeable future, while keeping Shaarli simple and efficient. 122in this repository, and will keep maintaining the project for the foreseeable
123future, while keeping Shaarli simple and efficient.
124
109 125
110### Contributing 126### Contributing
127
111If you'd like to help, please: 128If you'd like to help, please:
129
112- have a look at the open [issues](https://github.com/shaarli/Shaarli/issues) 130- have a look at the open [issues](https://github.com/shaarli/Shaarli/issues)
113and [pull requests](https://github.com/shaarli/Shaarli/pulls) 131and [pull requests](https://github.com/shaarli/Shaarli/pulls)
114- feel free to report bugs (feedback is much appreciated) 132- feel free to report bugs (feedback is much appreciated)
115- suggest new features and improvements to both code and [documentation](https://github.com/shaarli/Shaarli/wiki) 133- suggest new features and improvements to both code and [documentation](https://github.com/shaarli/Shaarli/tree/master/doc/md/)
116- propose solutions to existing problems 134- propose solutions to existing problems
117- submit pull requests :-) 135- submit pull requests :-)
118 136
119 137
120### License 138### License
121Shaarli is [Free Software](http://en.wikipedia.org/wiki/Free_software). See [COPYING](COPYING) for a detail of the contributors and licenses for each individual component. 139
140Shaarli is [Free Software](http://en.wikipedia.org/wiki/Free_software). See
141[COPYING](https://github.com/shaarli/Shaarli/blob/master/COPYING) for a detail
142of the contributors and licenses for each individual component. A list of
143contributors is available
144[here](https://github.com/shaarli/Shaarli/blob/master/AUTHORS).
122 145
diff --git a/docker/alpine/Dockerfile.armhf.latest b/docker/alpine/Dockerfile.armhf.latest
deleted file mode 100644
index 824a1926..00000000
--- a/docker/alpine/Dockerfile.armhf.latest
+++ /dev/null
@@ -1,49 +0,0 @@
1FROM lsiobase/alpine.armhf:3.6
2MAINTAINER Shaarli Community
3
4RUN apk --update --no-cache add \
5 ca-certificates \
6 curl \
7 nginx \
8 php7 \
9 php7-ctype \
10 php7-curl \
11 php7-fpm \
12 php7-gd \
13 php7-iconv \
14 php7-intl \
15 php7-json \
16 php7-mbstring \
17 php7-openssl \
18 php7-phar \
19 php7-session \
20 php7-xml \
21 php7-zlib \
22 s6
23
24COPY nginx.conf /etc/nginx/nginx.conf
25COPY php-fpm.conf /etc/php7/php-fpm.conf
26COPY services.d /etc/services.d
27
28RUN curl -sS https://getcomposer.org/installer | php7 -- --install-dir=/usr/local/bin --filename=composer \
29 && rm -rf /etc/php7/php-fpm.d/www.conf \
30 && sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php7/php.ini \
31 && sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php7/php.ini
32
33
34WORKDIR /var/www
35RUN curl -L https://github.com/shaarli/Shaarli/archive/latest.tar.gz | tar xzf - \
36 && mv Shaarli-latest shaarli \
37 && cd shaarli \
38 && composer --prefer-dist --no-dev install \
39 && rm -rf ~/.composer \
40 && chown -R nginx:nginx . \
41 && ln -sf /dev/stdout /var/log/nginx/shaarli.access.log \
42 && ln -sf /dev/stderr /var/log/nginx/shaarli.error.log
43
44VOLUME /var/www/shaarli/data
45
46EXPOSE 80
47
48ENTRYPOINT ["/bin/s6-svscan", "/etc/services.d"]
49CMD []
diff --git a/docker/alpine/Dockerfile.latest b/docker/alpine/Dockerfile.latest
deleted file mode 100644
index 755d8751..00000000
--- a/docker/alpine/Dockerfile.latest
+++ /dev/null
@@ -1,54 +0,0 @@
1# Stage 1:
2# - Get Shaarli sources
3# - Resolve PHP dependencies with Composer
4FROM composer:latest as composer
5RUN curl -L https://github.com/shaarli/Shaarli/archive/latest.tar.gz | tar xzf - \
6 && mv Shaarli-latest shaarli \
7 && cd shaarli \
8 && composer --prefer-dist --no-dev install
9
10# Stage 2:
11# - Shaarli image
12FROM alpine:3.6
13LABEL maintainer="Shaarli Community"
14
15RUN apk --update --no-cache add \
16 ca-certificates \
17 nginx \
18 php7 \
19 php7-ctype \
20 php7-curl \
21 php7-fpm \
22 php7-gd \
23 php7-iconv \
24 php7-intl \
25 php7-json \
26 php7-mbstring \
27 php7-openssl \
28 php7-session \
29 php7-xml \
30 php7-zlib \
31 s6
32
33COPY nginx.conf /etc/nginx/nginx.conf
34COPY php-fpm.conf /etc/php7/php-fpm.conf
35COPY services.d /etc/services.d
36
37RUN rm -rf /etc/php7/php-fpm.d/www.conf \
38 && sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php7/php.ini \
39 && sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php7/php.ini
40
41
42WORKDIR /var/www
43COPY --from=composer /app/shaarli shaarli
44
45RUN chown -R nginx:nginx . \
46 && ln -sf /dev/stdout /var/log/nginx/shaarli.access.log \
47 && ln -sf /dev/stderr /var/log/nginx/shaarli.error.log
48
49VOLUME /var/www/shaarli/data
50
51EXPOSE 80
52
53ENTRYPOINT ["/bin/s6-svscan", "/etc/services.d"]
54CMD []
diff --git a/docker/alpine/IMAGE.md b/docker/alpine/IMAGE.md
deleted file mode 100644
index a8952257..00000000
--- a/docker/alpine/IMAGE.md
+++ /dev/null
@@ -1,10 +0,0 @@
1## Alpine images
2- [Alpine Linux](https://www.alpinelinux.org/)
3- [PHP-FPM](http://php-fpm.org/)
4- [Nginx](http://nginx.org/)
5
6### `shaarli/shaarli:latest`
7- [Shaarli](https://github.com/shaarli/Shaarli), `latest` branch
8
9### `shaarli/shaarli:master`
10- [Shaarli](https://github.com/shaarli/Shaarli), `master` branch
diff --git a/docker/debian/Dockerfile.stable b/docker/debian/Dockerfile.stable
deleted file mode 100644
index fc9588b0..00000000
--- a/docker/debian/Dockerfile.stable
+++ /dev/null
@@ -1,37 +0,0 @@
1FROM debian:jessie
2MAINTAINER Shaarli Community
3
4ENV TERM dumb
5RUN apt-get update \
6 && apt-get install --no-install-recommends -y \
7 ca-certificates \
8 curl \
9 nginx-light \
10 php5-curl \
11 php5-fpm \
12 php5-gd \
13 php5-intl \
14 supervisor \
15 && apt-get clean
16
17RUN sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php5/fpm/php.ini
18RUN sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php5/fpm/php.ini
19COPY nginx.conf /etc/nginx/nginx.conf
20COPY supervised.conf /etc/supervisor/conf.d/supervised.conf
21
22ADD https://getcomposer.org/composer.phar /usr/local/bin/composer
23RUN chmod 755 /usr/local/bin/composer
24
25WORKDIR /var/www
26RUN curl -L https://github.com/shaarli/Shaarli/archive/stable.tar.gz | tar xzf - \
27 && mv Shaarli-stable shaarli \
28 && cd shaarli \
29 && composer --prefer-dist --no-dev install
30RUN rm -rf html \
31 && chown -R www-data:www-data .
32
33VOLUME /var/www/shaarli/data
34
35EXPOSE 80
36
37CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/supervisord.conf"]
diff --git a/docker/debian/IMAGE.md b/docker/debian/IMAGE.md
deleted file mode 100644
index d85b1d7a..00000000
--- a/docker/debian/IMAGE.md
+++ /dev/null
@@ -1,5 +0,0 @@
1## shaarli:stable
2- [Debian 8 Jessie](https://hub.docker.com/_/debian/)
3- [PHP5-FPM](http://php-fpm.org/)
4- [Nginx](http://nginx.org/)
5- [Shaarli (stable)](https://github.com/shaarli/Shaarli/tree/stable)
diff --git a/docker/debian/nginx.conf b/docker/debian/nginx.conf
deleted file mode 100644
index e8754d9b..00000000
--- a/docker/debian/nginx.conf
+++ /dev/null
@@ -1,72 +0,0 @@
1user www-data www-data;
2daemon off;
3worker_processes 4;
4
5events {
6 worker_connections 768;
7}
8
9http {
10 include mime.types;
11 default_type application/octet-stream;
12 keepalive_timeout 20;
13
14 client_max_body_size 10m;
15
16 index index.html index.php;
17
18 server {
19 listen 80;
20 root /var/www/shaarli;
21
22 access_log /var/log/nginx/shaarli.access.log;
23 error_log /var/log/nginx/shaarli.error.log;
24
25 location ~ /\. {
26 # deny access to dotfiles
27 access_log off;
28 log_not_found off;
29 deny all;
30 }
31
32 location ~ ~$ {
33 # deny access to temp editor files, e.g. "script.php~"
34 access_log off;
35 log_not_found off;
36 deny all;
37 }
38
39 location ~* \.(?:ico|css|js|gif|jpe?g|png)$ {
40 # cache static assets
41 expires max;
42 add_header Pragma public;
43 add_header Cache-Control "public, must-revalidate, proxy-revalidate";
44 }
45
46 location = /favicon.ico {
47 # serve the Shaarli favicon from its custom location
48 alias /var/www/shaarli/images/favicon.ico;
49 }
50
51 location / {
52 # Slim - rewrite URLs
53 try_files $uri /index.php$is_args$args;
54 }
55
56 location ~ (index)\.php$ {
57 # Slim - split URL path into (script_filename, path_info)
58 try_files $uri =404;
59 fastcgi_split_path_info ^(.+\.php)(/.+)$;
60
61 # filter and proxy PHP requests to PHP-FPM
62 fastcgi_pass unix:/var/run/php5-fpm.sock;
63 fastcgi_index index.php;
64 include fastcgi.conf;
65 }
66
67 location ~ \.php$ {
68 # deny access to all other PHP scripts
69 deny all;
70 }
71 }
72}
diff --git a/docker/debian/supervised.conf b/docker/debian/supervised.conf
deleted file mode 100644
index 5acd9795..00000000
--- a/docker/debian/supervised.conf
+++ /dev/null
@@ -1,13 +0,0 @@
1[program:php5-fpm]
2command=/usr/sbin/php5-fpm -F
3priority=5
4autostart=true
5autorestart=true
6
7[program:nginx]
8command=/usr/sbin/nginx
9priority=10
10autostart=true
11autorestart=true
12stdout_events_enabled=true
13stderr_events_enabled=true
diff --git a/index.php b/index.php
index 6dcec9b2..29d67f62 100644
--- a/index.php
+++ b/index.php
@@ -48,7 +48,7 @@ if (! file_exists(__DIR__ . '/vendor/autoload.php')) {
48 ."If you installed Shaarli through Git or using the development branch,\n" 48 ."If you installed Shaarli through Git or using the development branch,\n"
49 ."please refer to the installation documentation to install PHP" 49 ."please refer to the installation documentation to install PHP"
50 ." dependencies using Composer:\n" 50 ." dependencies using Composer:\n"
51 ."- https://shaarli.readthedocs.io/en/master/Server-requirements/\n" 51 ."- https://shaarli.readthedocs.io/en/master/Server-configuration/\n"
52 ."- https://shaarli.readthedocs.io/en/master/Download-and-Installation/"; 52 ."- https://shaarli.readthedocs.io/en/master/Download-and-Installation/";
53 exit; 53 exit;
54} 54}
@@ -174,7 +174,7 @@ if (! is_file($conf->getConfigFileExt())) {
174 } 174 }
175 175
176 // Display the installation form if no existing config is found 176 // Display the installation form if no existing config is found
177 install($conf, $sessionManager); 177 install($conf, $sessionManager, $loginManager);
178} 178}
179 179
180$loginManager->checkLoginState($_COOKIE, $clientIpId); 180$loginManager->checkLoginState($_COOKIE, $clientIpId);
@@ -1823,8 +1823,9 @@ function lazyThumbnail($conf, $url,$href=false)
1823 * 1823 *
1824 * @param ConfigManager $conf Configuration Manager instance. 1824 * @param ConfigManager $conf Configuration Manager instance.
1825 * @param SessionManager $sessionManager SessionManager instance 1825 * @param SessionManager $sessionManager SessionManager instance
1826 * @param LoginManager $loginManager LoginManager instance
1826 */ 1827 */
1827function install($conf, $sessionManager) { 1828function install($conf, $sessionManager, $loginManager) {
1828 // On free.fr host, make sure the /sessions directory exists, otherwise login will not work. 1829 // On free.fr host, make sure the /sessions directory exists, otherwise login will not work.
1829 if (endsWith($_SERVER['HTTP_HOST'],'.free.fr') && !is_dir($_SERVER['DOCUMENT_ROOT'].'/sessions')) mkdir($_SERVER['DOCUMENT_ROOT'].'/sessions',0705); 1830 if (endsWith($_SERVER['HTTP_HOST'],'.free.fr') && !is_dir($_SERVER['DOCUMENT_ROOT'].'/sessions')) mkdir($_SERVER['DOCUMENT_ROOT'].'/sessions',0705);
1830 1831
diff --git a/mkdocs.yml b/mkdocs.yml
index 8ba25540..a1226e8f 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -5,13 +5,13 @@ site_description: The personal, minimalist, super-fast, database free, bookmarki
5theme: readthedocs 5theme: readthedocs
6docs_dir: doc/md 6docs_dir: doc/md
7site_dir: doc/html 7site_dir: doc/html
8strict: true
8 9
9pages: 10pages:
10- Home: index.md 11- Home: index.md
11- Setup: 12- Setup:
12 - Download and Installation: Download-and-Installation.md 13 - Download and Installation: Download-and-Installation.md
13 - Upgrade and migration: Upgrade-and-migration.md 14 - Upgrade and migration: Upgrade-and-migration.md
14 - Server requirements: Server-requirements.md
15 - Server configuration: Server-configuration.md 15 - Server configuration: Server-configuration.md
16 - Server security: Server-security.md 16 - Server security: Server-security.md
17 - Shaarli configuration: Shaarli-configuration.md 17 - Shaarli configuration: Shaarli-configuration.md
@@ -24,7 +24,7 @@ pages:
24- Usage: 24- Usage:
25 - Browsing and searching: Browsing-and-searching.md 25 - Browsing and searching: Browsing-and-searching.md
26 - Sharing content: Sharing-content.md 26 - Sharing content: Sharing-content.md
27 - RSS feeds: RSS-feeds.md 27 - RSS feeds: RSS-feeds.md
28 - REST API: REST-API.md 28 - REST API: REST-API.md
29 - Community & Related software: Community-&-Related-software.md 29 - Community & Related software: Community-&-Related-software.md
30- How To: 30- How To:
diff --git a/docker/test/alpine36/Dockerfile b/tests/docker/alpine36/Dockerfile
index fa84f6e2..fa84f6e2 100644
--- a/docker/test/alpine36/Dockerfile
+++ b/tests/docker/alpine36/Dockerfile
diff --git a/docker/test/debian8/Dockerfile b/tests/docker/debian8/Dockerfile
index eaa34e9b..eaa34e9b 100644
--- a/docker/test/debian8/Dockerfile
+++ b/tests/docker/debian8/Dockerfile
diff --git a/docker/test/debian9/Dockerfile b/tests/docker/debian9/Dockerfile
index 3ab4b93d..3ab4b93d 100644
--- a/docker/test/debian9/Dockerfile
+++ b/tests/docker/debian9/Dockerfile
diff --git a/docker/test/ubuntu16/Dockerfile b/tests/docker/ubuntu16/Dockerfile
index e53ed9e3..e53ed9e3 100644
--- a/docker/test/ubuntu16/Dockerfile
+++ b/tests/docker/ubuntu16/Dockerfile
diff --git a/tpl/default/includes.html b/tpl/default/includes.html
index 34e0ff01..5ccacaaf 100644
--- a/tpl/default/includes.html
+++ b/tpl/default/includes.html
@@ -2,6 +2,7 @@
2<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 2<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
3<meta name="format-detection" content="telephone=no" /> 3<meta name="format-detection" content="telephone=no" />
4<meta name="viewport" content="width=device-width, initial-scale=1"> 4<meta name="viewport" content="width=device-width, initial-scale=1">
5<meta name="referrer" content="same-origin">
5<link rel="alternate" type="application/atom+xml" href="{$feedurl}?do=atom{$searchcrits}#" title="ATOM Feed" /> 6<link rel="alternate" type="application/atom+xml" href="{$feedurl}?do=atom{$searchcrits}#" title="ATOM Feed" />
6<link rel="alternate" type="application/rss+xml" href="{$feedurl}?do=rss{$searchcrits}#" title="RSS Feed" /> 7<link rel="alternate" type="application/rss+xml" href="{$feedurl}?do=rss{$searchcrits}#" title="RSS Feed" />
7<link href="img/favicon.png" rel="shortcut icon" type="image/png" /> 8<link href="img/favicon.png" rel="shortcut icon" type="image/png" />