mirror of
https://github.com/EdyTheCow/docker-whmcs.git
synced 2026-04-02 10:49:30 +00:00
Optimize, clean up and comments
- Add comments to .env - Place basic auth directly into labels instead - Remove whmcs data folders, these are now created automatically
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
##
|
||||
# General Variables
|
||||
##
|
||||
|
||||
COMPOSE_PROJECT_NAME=base
|
||||
DATA_DIR=../data
|
||||
# --- General ---
|
||||
# Container name prefix
|
||||
COMPOSE_PROJECT_NAME=whmcs
|
||||
# Where data is going to be stored on host server
|
||||
DATA_DIR=../data
|
||||
@@ -14,9 +14,6 @@ services:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
- ${DATA_DIR}/traefik/traefik.toml:/etc/traefik/traefik.toml
|
||||
- ${DATA_DIR}/traefik/acme.json:/acme.json
|
||||
- ${DATA_DIR}/traefik/.htpasswd:/.htpasswd
|
||||
labels:
|
||||
- "traefik.http.middlewares.basic-auth.basicauth.usersfile=/.htpasswd"
|
||||
|
||||
networks:
|
||||
docker-whmcs-network:
|
||||
|
||||
@@ -12,14 +12,8 @@
|
||||
[providers.docker]
|
||||
exposedbydefault = false
|
||||
|
||||
[certificatesResolvers.cloudflare.acme]
|
||||
email = "admin@your_domain.com"
|
||||
[certificatesResolvers.cloudflare.acme.dnsChallenge]
|
||||
provider = "cloudflare"
|
||||
delayBeforeCheck = 0
|
||||
|
||||
[certificatesResolvers.letsencrypt.acme]
|
||||
email = "admin@your_domain.com"
|
||||
storage = "acme.json"
|
||||
[certificatesResolvers.letsencrypt.acme.httpChallenge]
|
||||
entryPoint = "web"
|
||||
entryPoint = "web"
|
||||
@@ -1,16 +1,32 @@
|
||||
# All of the variables provided here will configure everything for initial installation
|
||||
# You don't need to edit or change anything inside docker-compose.yml
|
||||
|
||||
# --- General ---
|
||||
# Container name prefix
|
||||
COMPOSE_PROJECT_NAME=whmcs
|
||||
|
||||
# General
|
||||
DOMAIN=your-domain.com
|
||||
# Where data is going to be stored on host server
|
||||
DATA_DIR=../data
|
||||
|
||||
# Database
|
||||
# --- Traefik ---
|
||||
# Domain used to access WHMCS
|
||||
DOMAIN=
|
||||
# Basic auth for WHMCS /admin page
|
||||
# Follow instructions in README on how to generate credentials
|
||||
BASIC_AUTH_CREDENTIALS=
|
||||
|
||||
# --- MySQL ---
|
||||
# Database name
|
||||
MYSQL_DATABASE=whmcs
|
||||
# Database user
|
||||
MYSQL_USER=whmcs
|
||||
# Database user's password
|
||||
MYSQL_PASSWORD=
|
||||
# Database's root user password
|
||||
MYSQL_ROOT_PASSWORD=
|
||||
|
||||
# Nginx
|
||||
# --- Nginx ---
|
||||
# For trusting Traefik's internal IP to pass real user's IP to WHMCS
|
||||
TRAEFIK_SUBNET=
|
||||
# Used by WHMCS, this IP will appear in you WHMCS license
|
||||
# Recommended to set it, otherwise internal container IP is used which can change after restart
|
||||
PUBLIC_SERVER_IP=
|
||||
@@ -30,8 +30,8 @@ services:
|
||||
- "traefik.http.services.whmcs-https.loadbalancer.server.port=80"
|
||||
# Basic auth for /admin page
|
||||
- "traefik.http.routers.whmcs-admin.rule=Host(`${DOMAIN}`) && PathPrefix(`/admin`)"
|
||||
- "traefik.http.middlewares.basic-auth.basicauth.usersfile=/.htpasswd"
|
||||
- "traefik.http.routers.whmcs-admin.middlewares=basic-auth"
|
||||
- "traefik.http.middlewares.whmcs-admin-auth.basicauth.users=${BASIC_AUTH_CREDENTIALS}"
|
||||
- "traefik.http.routers.whmcs-admin.middlewares=whmcs-admin-auth"
|
||||
- "traefik.http.routers.whmcs-admin.tls=true"
|
||||
|
||||
php-fpm:
|
||||
|
||||
Reference in New Issue
Block a user