diff --git a/README.md b/README.md
index 5662d97..9bbc793 100644
--- a/README.md
+++ b/README.md
@@ -25,6 +25,11 @@ Navigate to `_base/data/traefik/` and run
sudo chmod 600 acme.json
```
+Create docker network
+```
+docker network create docker-whmcs-network
+```
+
Generate .htpasswd user and pass
Navigate to `_base/data/traefik/.htpasswd` and place your generated user/pass in there
@@ -103,6 +108,11 @@ Navigate to `whmcs/data/whmcs` and move `crons` directory to `whmcs/data/whmcs_s
Navigate to `crons` and edit `config.php.new`, inside the config uncomment the `whmcspath` option and set the new path to `/var/www/html/`.
Rename the `config.php.new` to `config.php`. Navigate to `whmcs/data/whmcs/configuration.php` and add this line at the bottom of the configuration `$crons_dir = '/var/www/whmcs_storage/crons/';`
+### eMail Import Cron (optional)
+Official source: [docs.whmcs.com](https://docs.whmcs.com/Email_Importing)
+Navigate to `whmcs/compose` and edit `docker-compose.yml`, inside the file uncomment the two commands under the ofelia-labels.
+Rebuild stack with `docker-compose down && docker-compose up -d`.
+
## Setting update folder
Official source: [help.whmcs.com](https://help.whmcs.com/m/updating/l/678178-configuring-the-temporary-path)
Setting update folder will allow you to automatically update WHMCS in the future. Similar to file storage the update folder will be located above the web root inside `whmcs_storage` directory.
diff --git a/_base/compose/docker-compose.yml b/_base/compose/docker-compose.yml
index 4a69285..9d3ea92 100644
--- a/_base/compose/docker-compose.yml
+++ b/_base/compose/docker-compose.yml
@@ -1,7 +1,7 @@
version: '3.7'
networks:
- global:
+ docker-whmcs-network:
external: true
services:
@@ -11,7 +11,7 @@ services:
env_file:
- .env
networks:
- - global
+ - docker-whmcs-network
restart: always
ports:
- "80:80"
diff --git a/whmcs/compose/docker-compose.yml b/whmcs/compose/docker-compose.yml
index eafa89e..5e0843c 100644
--- a/whmcs/compose/docker-compose.yml
+++ b/whmcs/compose/docker-compose.yml
@@ -1,9 +1,9 @@
version: '3.5'
networks:
- local:
+ docker-whmcs-network-internal:
external: false
- global:
+ docker-whmcs-network:
external: true
services:
@@ -28,10 +28,10 @@ services:
depends_on:
- php-fpm
networks:
- - local
- - global
+ - docker-whmcs-network-internal
+ - docker-whmcs-network
labels:
- - "traefik.docker.network=global"
+ - "traefik.docker.network=docker-whmcs-network"
# HTTP
- "traefik.http.routers.whmcs.entrypoints=web"
- "traefik.http.routers.whmcs.rule=Host(`${DOMAIN}`)"
@@ -60,11 +60,14 @@ services:
environment:
- PHP_IDE_CONFIG=xwhmcs
networks:
- - local
+ - docker-whmcs-network-internal
labels:
- "ofelia.enabled=true"
- "ofelia.job-exec.whmcs.schedule=@every 5m"
- "ofelia.job-exec.whmcs.command=php -q /var/www/whmcs_storage/crons/cron.php"
+ # Cronjobs for mail-to-ticket import. Uncomment to fetch new emails every minute.
+ # - "ofelia.job-exec.whmcs-mail-import.schedule=@every 1m"
+ # - "ofelia.job-exec.whmcs-mail-import.command=php -q /var/www/whmcs_storage/crons/pop.php"
mysql:
image: mysql:8
@@ -76,5 +79,5 @@ services:
volumes:
- ${DATA_DIR}/mysql:/var/lib/mysql
networks:
- - local
+ - docker-whmcs-network-internal