diff --git a/_base/compose/.env b/_base/compose/.env index 0f38611..8653620 100644 --- a/_base/compose/.env +++ b/_base/compose/.env @@ -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 \ No newline at end of file diff --git a/_base/compose/docker-compose.yml b/_base/compose/docker-compose.yml index d49f740..168af22 100644 --- a/_base/compose/docker-compose.yml +++ b/_base/compose/docker-compose.yml @@ -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: diff --git a/_base/data/traefik/.htpasswd b/_base/data/traefik/.htpasswd deleted file mode 100644 index e69de29..0000000 diff --git a/_base/data/traefik/traefik.toml b/_base/data/traefik/traefik.toml index 520dc92..85999bc 100644 --- a/_base/data/traefik/traefik.toml +++ b/_base/data/traefik/traefik.toml @@ -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" \ No newline at end of file diff --git a/whmcs/compose/.env b/whmcs/compose/.env index 7c8909f..4558832 100644 --- a/whmcs/compose/.env +++ b/whmcs/compose/.env @@ -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= \ No newline at end of file diff --git a/whmcs/compose/docker-compose.yml b/whmcs/compose/docker-compose.yml index d2bcc5a..ebe195d 100644 --- a/whmcs/compose/docker-compose.yml +++ b/whmcs/compose/docker-compose.yml @@ -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: diff --git a/whmcs/data/whmcs_storage/attachments/projects/.gitignore b/whmcs/data/whmcs_storage/.gitignore similarity index 100% rename from whmcs/data/whmcs_storage/attachments/projects/.gitignore rename to whmcs/data/whmcs_storage/.gitignore diff --git a/whmcs/data/whmcs_storage/downloads/.gitignore b/whmcs/data/whmcs_storage/downloads/.gitignore deleted file mode 100644 index e69de29..0000000 diff --git a/whmcs/data/whmcs_storage/templates_c/.gitignore b/whmcs/data/whmcs_storage/templates_c/.gitignore deleted file mode 100644 index e69de29..0000000 diff --git a/whmcs/data/whmcs_storage/whmcs_updater_tmp_dir/.gitignore b/whmcs/data/whmcs_storage/whmcs_updater_tmp_dir/.gitignore deleted file mode 100644 index e69de29..0000000