Skip to content

Commit 952cdf4

Browse files
committed
example dhi
example config with DHI for WSC
1 parent dff9ba1 commit 952cdf4

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

examples/fpm-nginx-dhi/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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.

examples/fpm-nginx-dhi/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ services:
7171
# only support in DHI (instead of own *.cnf file)
7272
MYSQL_OPTIONS: "--innodb-buffer-pool-size=512M"
7373
# not supported in DHI, but for commands to create database and user
74-
MYSQL_DATABASE: "${MYSQL_DATABASE}"
74+
MYSQL_DATABASE: "${MYSQL_DATABASE:-wcf}"
7575
MYSQL_USER: "${MYSQL_USER}"
7676
MYSQL_PASSWORD: "${MYSQL_PASSWORD}"
7777
#ports:

0 commit comments

Comments
 (0)