|
| 1 | +# PHP - Examples: PHP-FPM & NGINX & MySQL |
| 2 | + |
| 3 | +## Information |
| 4 | + |
| 5 | +This example docker-compose setup for [WSC (WoltLab Suite Core)](https://www.woltlab.com) contains 3 Docker Images: |
| 6 | +* **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. |
| 8 | +* [NGINX Image](https://dhi.io/catalog/nginx) from DHI |
| 9 | +* [MySQL Image](https://dhi.io/catalog/mysql) from DHI |
| 10 | + |
| 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 | +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 | + |
| 17 | +## Steps |
| 18 | +1. Important: Login to dhi.io (`docker login dhi.io`) and optional to docker.io (`docker login`) on your server, if not already done. |
| 19 | +2. Copy this folder to your server and move into it. |
| 20 | +3. Rename `.env.example` to `.env` and configure your domain and database settings. |
| 21 | + (Password generator: [randompasswordgenerator.com](https://randompasswordgenerator.com)) |
| 22 | + * `mv .env.example .env` |
| 23 | + * `nano .env` |
| 24 | +4. create some subfolder: |
| 25 | + * `mkdir ./html && chown 65532:65532 ./html` |
| 26 | + * `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: |
| 29 | + `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 | + Manual/Help: https://manual.woltlab.com/en/installation/ |
| 33 | + (Notice: Database Host is `wsc-db`!) |
| 34 | +9. Installation complete. |
| 35 | + |
| 36 | +If necessary, make further configurations for nginx or php in the files in the "config" folder. |
0 commit comments