Skip to content

Commit 5f4e910

Browse files
committed
README Update
1 parent 1351b16 commit 5f4e910

File tree

2 files changed

+39
-12
lines changed

2 files changed

+39
-12
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ PHP is a server-side scripting language designed for web development, but which
4141
* *Images with `-extended` suffix at present only for php images with nginx. (Prometheus Exporter and other)*
4242
* *Images containing `apache` or `nginx` are integrated with the web server.*
4343
* *Images containing `debian` or `alpine` specify the operating system.*
44-
* *Images containing `dhi` based on [DHI (Docker Hardened Images)](https://dhi.io/catalog/php) and not based on offical images from community. This DHI do not have a shell and therefore NO entrypoint script. The environment variables listed in the README therefore do not work here. Mount your configuration file(s).*
44+
* *Images containing `dhi` based on [DHI (Docker Hardened Images)](https://dhi.io/catalog/php) and not based on offical images from community. This DHI do not have a shell and therefore NO entrypoint script. The environment variables listed in the README therefore do not work here. Mount your configuration file(s). A example docker-compose setup you can find [here](https://github.com/Tob1as/docker-php/tree/master/examples/fpm-nginx-dhi).*
4545
* For easy install the extensions and get a smaller images it use [php-extension-installer](https://github.com/mlocati/docker-php-extension-installer).
4646
* For information about PHP and extensions see here: [php.net](https://php.net) and [pecl.php.net](https://pecl.php.net).
4747

examples/fpm-nginx-dhi/README.md

Lines changed: 38 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,18 @@
44

55
This example docker-compose setup for [WSC (WoltLab Suite Core)](https://www.woltlab.com) contains 3 Docker Images:
66
* **PHP** Image from this GitHub Repository.
7-
It based on [PHP Image](https://dhi.io/catalog/php) from DHI (Docker Hardened Images) and includes extensions required for WSC.
7+
It based on [PHP Image](https://dhi.io/catalog/php) from DHI (Docker Hardened Images) and includes extensions required for WSC.
8+
This DHI image has no shell and entrypoint.
89
* [NGINX Image](https://dhi.io/catalog/nginx) from DHI
910
* [MySQL Image](https://dhi.io/catalog/mysql) from DHI
1011

11-
In this setup [Traefik](https://traefik.io/traefik) is use as Proxy, a example can find here [https://github.com/Tob1as/docker-kubernetes-collection](https://github.com/Tob1as/docker-kubernetes-collection/blob/master/examples_docker-compose/traefik_v3.yml).
12+
13+
Notes:
14+
* In this setup [Traefik](https://traefik.io/traefik) is use as Proxy, a example can find here [https://github.com/Tob1as/docker-kubernetes-collection](https://github.com/Tob1as/docker-kubernetes-collection/blob/master/examples_docker-compose/traefik_v3.yml).
1215
If you don't want to use it, make adjustments in the NGINX configuration file in "config" folder.
13-
14-
**Important: To pull Images from DHI you must login with your docker account.**
15-
(Sourcecode from DH-Images can found here [https://github.com/docker-hardened-images](https://github.com/docker-hardened-images/catalog/tree/main/image).)
16+
* **Important: To pull Images from DHI you must login with your docker account.**
17+
* (Sourcecode from DH-Images can found here [https://github.com/docker-hardened-images](https://github.com/docker-hardened-images/catalog/tree/main/image).)
18+
* DHI images (mostly) have no shell and no entrypoint.
1619

1720
## Steps
1821
1. Important: Login to dhi.io (`docker login dhi.io`) and optional to docker.io (`docker login`) on your server, if not already done.
@@ -24,13 +27,37 @@ If you don't want to use it, make adjustments in the NGINX configuration file in
2427
4. create some subfolder:
2528
* `mkdir ./html && chown 65532:65532 ./html`
2629
* `mkdir ./data-db && chown 65532:65532 ./data-db`
27-
5. [Download WSC](https://www.woltlab.com/en/woltlab-suite-download/) and unzip archive and copy all files from "upload" folder to "html" folder on your server.
28-
6. Start the container setup with:
30+
5. Start the container setup with:
2931
`docker-compose up -d`
30-
7. call your domain and file test.php, example: `http://example.com/test.php`
31-
8. Now follows the installation setup of the WSC.
32+
6. Create MySQL Databse and User:
33+
```sh
34+
# create database
35+
docker exec -it wsc-mysql bash -c 'mysql -uroot -e "CREATE DATABASE ${MYSQL_DATABASE};"'
36+
# create user and set permissions
37+
docker exec -it wsc-mysql bash -c 'mysql -uroot -e "CREATE USER \"${MYSQL_USER}\"@\"%\" IDENTIFIED BY \"${MYSQL_PASSWORD}\"; GRANT ALL PRIVILEGES ON ${MYSQL_DATABASE}.* TO \"${MYSQL_USER}\"@\"%\";"'
38+
```
39+
7. [Download WSC](https://www.woltlab.com/en/woltlab-suite-download/) and unzip archive and copy all files from "upload" folder in "html" folder on your server.
40+
8. Call your domain and file test.php, example: `http://example.com/test.php`
41+
9. Now follows the installation setup of the WSC.
3242
Manual/Help: https://manual.woltlab.com/en/installation/
3343
(Notice: Database Host is `wsc-db`!)
34-
9. Installation complete.
44+
10. Installation complete.
45+
46+
If necessary, make further configurations for nginx or php in the files in the "config" folder.
47+
48+
> If you want to migrate from another PHP image, e.g. the official community image or other images in this repository, then adjust the folder and file permissions for the html folder:
49+
`chown 65532:65532 ./html`
50+
51+
## PHP extensions
52+
53+
The base [PHP Image](https://dhi.io/catalog/php) of DHI includes the following PHP extensions by default:
54+
`cgi-fcgi Core ctype curl date dom fileinfo filter hash iconv intl json libxml mbstring mysqlnd openssl pcre PDO pdo_sqlite Phar posix random readline Reflection session SimpleXML sodium SPL sqlite3 standard tokenizer xml xmlreader xmlwriter 'Zend OPcache' zlib`
55+
(Check with: `docker run --rm dhi.io/php:<PHP_VERSION>-<OS>-fpm -m`)
56+
57+
The following extensions have been added (for WSC) to the image of this repository:
58+
`gd pdo_mysql ldap gmp exif redis imagick`
59+
(Check with: `docker run --rm docker.io/tobi312/php:<PHP_VERSION>-dhi-fpm-<OS>-wsc -m`)
3560

36-
If necessary, make further configurations for nginx or php in the files in the "config" folder.
61+
You can check it with `-m` in docker run command or you can place a phpinfo.php file in the "html" folder and call in web browser:
62+
`echo '<?php phpinfo(); ?>' > ./html/phpinfo.php`
63+
Please delete the file afterwards!

0 commit comments

Comments
 (0)