Skip to content

Commit 16f959c

Browse files
Merge pull request #9 from nikurasutan/docker-documentation
feat(docker-documentation): add docker deploy docs
2 parents a371c19 + 20e6083 commit 16f959c

File tree

1 file changed

+84
-0
lines changed

1 file changed

+84
-0
lines changed

docs/docker/setup.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# Docker Setup
2+
3+
You can find the offical Docker Version of LinkStack [here](https://github.com/linkstackorg/linkstack-docker).
4+
5+
The docker version of LinkStack retains all the features and customization options of the [original version](https://github.com/JulianPrieber/littlelink-custom).
6+
7+
This docker is based on [Alpine Linux](https://www.alpinelinux.org/), a Linux distribution designed to be small, simple and secure. The web server is running [Apache2](https://www.apache.org/), a free and open-source cross-platform web server software. The docker comes with [PHP 8.0](https://www.php.net/releases/8.0/en.php) for high compatibility and performance.
8+
9+
## Deployment
10+
The Docker Image exposes HTTP on port 80 and HTTPS on Port 443. You can modify your deployment via the following optional environment variables
11+
12+
|Variable|Function|default Value|
13+
|---|---|---|
14+
|SERVER_ADMIN|The admin's email address|[email protected]|
15+
|HTTP_SERVER_NAME|the http [server name](https://httpd.apache.org/docs/2.4/fr/mod/core.html#servername) of apache2|localhost|
16+
|HTTPS_SERVER_NAME|the https [server name](https://httpd.apache.org/docs/2.4/fr/mod/core.html#servername) of apache2|localhost|
17+
|LOG_LEVEL|The [log level](https://httpd.apache.org/docs/2.4/fr/mod/core.html#loglevel) of apache2|info|
18+
|TZ|The [timezone](https://www.php.net/manual/timezones.php)|UTC|
19+
|PHP_MEMORY_LIMIT|The php [memory-limit](https://www.php.net/manual/ini.core.php#ini.memory-limit)|256M|
20+
|UPLOAD_MAX_FILESIZE| The [upload-max-filesize](https://www.php.net/manual/en/ini.core.php#ini.upload-max-filesize) of PHP|8M|
21+
22+
### Supported Architectures
23+
- linux/amd64
24+
- linux/arm/v6
25+
- linux/arm/v7
26+
- linux/arm64
27+
28+
### Docker Run Deployment
29+
30+
```shell
31+
docker volume create linkstack
32+
33+
docker run --detach \
34+
--name linkstack \
35+
--publish 80:80 \
36+
--publish 443:443 \
37+
--restart unless-stopped \
38+
--mount source=linkstack,target=/htdocs \
39+
linkstackorg/linkstack
40+
```
41+
42+
customized:
43+
44+
```shell
45+
docker run --detach \
46+
--name linkstack \
47+
--hostname linkstack \
48+
--env HTTP_SERVER_NAME="www.example.xyz" \
49+
--env HTTPS_SERVER_NAME="www.example.xyz" \
50+
--env SERVER_ADMIN="[email protected]" \
51+
--env TZ="Europe/Berlin" \
52+
--env PHP_MEMORY_LIMIT="512M" \
53+
--env UPLOAD_MAX_FILESIZE="8M" \
54+
--publish 80:80 \
55+
--publish 443:443 \
56+
--restart unless-stopped \
57+
--mount source=linkstack,target=/htdocs \
58+
linkstackorg/linkstack
59+
```
60+
61+
### Docker Compose Stack
62+
63+
```yaml
64+
version: '3'
65+
services:
66+
linkstack:
67+
image: linkstackorg/linkstack:latest
68+
environment:
69+
- TZ=Europe/Berlin
70+
71+
- HTTP_SERVER_NAME=www.example.xyz
72+
- HTTPS_SERVER_NAME=www.example.xyz
73+
- LOG_LEVEL=info
74+
- PHP_MEMORY_LIMIT=512M
75+
- UPLOAD_MAX_FILESIZE=16M
76+
volumes:
77+
- linkstack:/htdocs
78+
restart: unless-stopped
79+
volumes:
80+
linkstack:
81+
```
82+
83+
## Docker Bind Mounts
84+
It's also possible to run the image with [Docker Bind Mounts](https://docs.docker.com/storage/bind-mounts/) instead of [Docker Volumes](https://docs.docker.com/storage/volumes/). But you have to download the [latest release of linkstack](https://github.com/linkstackorg/linkstack/releases/latest/download/linkstack.zip) by yourself and place it in the mounted directory if you do that. Be sure to give the files the owner and group `apache` with the uid 100 and gid 101.

0 commit comments

Comments
 (0)