diff options
author | ArthurHoaro <arthur@hoa.ro> | 2018-07-28 11:19:53 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2018-07-28 11:19:53 +0200 |
commit | 7982c3ff183aa985177bdaeacda4feb22a739e00 (patch) | |
tree | 728e07251072f3a1df63c017c0dce54fa1acb390 /doc/md/docker | |
parent | 2075321f6569dfa610905991b315aae1956b7f78 (diff) | |
parent | ed7e1be12d65bdb1b924c7efb6a84fd591192c6c (diff) | |
download | Shaarli-7982c3ff183aa985177bdaeacda4feb22a739e00.tar.gz Shaarli-7982c3ff183aa985177bdaeacda4feb22a739e00.tar.zst Shaarli-7982c3ff183aa985177bdaeacda4feb22a739e00.zip |
Merge tag 'v0.10.0' into latest
Release v0.10.0
Diffstat (limited to 'doc/md/docker')
-rw-r--r-- | doc/md/docker/reverse-proxy-configuration.md | 7 | ||||
-rw-r--r-- | doc/md/docker/shaarli-images.md | 49 |
2 files changed, 44 insertions, 12 deletions
diff --git a/doc/md/docker/reverse-proxy-configuration.md b/doc/md/docker/reverse-proxy-configuration.md index 6066140e..e53c9422 100644 --- a/doc/md/docker/reverse-proxy-configuration.md +++ b/doc/md/docker/reverse-proxy-configuration.md | |||
@@ -13,12 +13,14 @@ This guide assumes that: | |||
13 | - [mod_proxy](https://httpd.apache.org/docs/2.4/mod/mod_proxy.html) | 13 | - [mod_proxy](https://httpd.apache.org/docs/2.4/mod/mod_proxy.html) |
14 | - [Reverse Proxy Request Headers](https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#x-headers) | 14 | - [Reverse Proxy Request Headers](https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#x-headers) |
15 | 15 | ||
16 | The following HTTP headers are set by using the `ProxyPass` directive: | 16 | The following HTTP headers are set when the `ProxyPass` directive is set: |
17 | 17 | ||
18 | - `X-Forwarded-For` | 18 | - `X-Forwarded-For` |
19 | - `X-Forwarded-Host` | 19 | - `X-Forwarded-Host` |
20 | - `X-Forwarded-Server` | 20 | - `X-Forwarded-Server` |
21 | 21 | ||
22 | The original `SERVER_NAME` can be sent to the proxied host by setting the [`ProxyPreserveHost`](https://httpd.apache.org/docs/2.4/mod/mod_proxy.html#ProxyPreserveHost) directive to `On`. | ||
23 | |||
22 | ```apache | 24 | ```apache |
23 | <VirtualHost *:80> | 25 | <VirtualHost *:80> |
24 | ServerName shaarli.domain.tld | 26 | ServerName shaarli.domain.tld |
@@ -37,7 +39,8 @@ The following HTTP headers are set by using the `ProxyPass` directive: | |||
37 | CustomLog /var/log/apache2/shaarli-access.log combined | 39 | CustomLog /var/log/apache2/shaarli-access.log combined |
38 | 40 | ||
39 | RequestHeader set X-Forwarded-Proto "https" | 41 | RequestHeader set X-Forwarded-Proto "https" |
40 | 42 | ProxyPreserveHost On | |
43 | |||
41 | ProxyPass / http://127.0.0.1:10080/ | 44 | ProxyPass / http://127.0.0.1:10080/ |
42 | ProxyPassReverse / http://127.0.0.1:10080/ | 45 | ProxyPassReverse / http://127.0.0.1:10080/ |
43 | </VirtualHost> | 46 | </VirtualHost> |
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 | |||
8 | repository. | 8 | repository. |
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 | ||
15 | The `latest` and `master` images rely on: | 15 | The `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 | ||
27 | Additional [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/). | 27 | Additional Dockerfiles are provided for the `arm32v7` platform, relying on |
28 | [Linuxserver.io Alpine armhf | ||
29 | images](https://hub.docker.com/r/lsiobase/alpine.armhf/). These images must be | ||
30 | built using [`docker | ||
31 | build`](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 | |||
32 | latest: Pulling from shaarli/shaarli | 39 | latest: Pulling from shaarli/shaarli |
33 | 32716d9fcddb: Pull complete | 40 | 32716d9fcddb: Pull complete |
34 | 84899d045435: Pull complete | 41 | 84899d045435: 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 |
52 | d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101 | 59 | d40b7af693d678958adedfb88f87d6ea0237186c23de5c4102a55a8fcb499101 |
@@ -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! |
67 | backstabbing_galileo | 74 | backstabbing_galileo |
68 | 75 | ||
@@ -84,12 +91,34 @@ CONTAINER ID IMAGE COMMAND CREATED STATUS | |||
84 | ``` | 91 | ``` |
85 | 92 | ||
86 | ### Automatic builds | 93 | ### Automatic builds |
94 | Docker users can start a personal instance from an | ||
95 | [autobuild image](https://hub.docker.com/r/shaarli/shaarli/). | ||
96 | For example to start a temporary Shaarli at ``localhost:8000``, and keep session | ||
97 | data (config, storage): | ||
87 | 98 | ||
88 | Docker 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 | ``` | ||
90 | MY_SHAARLI_VOLUME=$(cd /path/to/shaarli/data/ && pwd -P) | 100 | MY_SHAARLI_VOLUME=$(cd /path/to/shaarli/data/ && pwd -P) |
91 | docker run -ti --rm \ | 101 | docker 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 | ||
108 | Data can be persisted by [using volumes](https://docs.docker.com/storage/volumes/). | ||
109 | Volumes 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 | ``` | ||