v3.11.0 (#211)
- PHP 7.4 support - Improved Webp images support with Cloudflare (Issue [#95](https://github.com/WordOps/WordOps/issues/95)). Nginx will not serve webp images alternative with Cloudflare IP ranges. - Stack upgrade for adminer - Check acme.sh installation and setup acme.sh if needed before issuing certificate - Add `--ufw` to `wo stack status` - Add Nginx directive `gzip_static on;` to serve precompressed assets with Cache-Enabler or WP-Rocket. (Issue [#207](https://github.com/WordOps/WordOps/issues/207)) - Previous `--php73` & `--php73=off` flags are replaced by `--php72`, `--php73`, `--php74` to switch site's php version - phpMyAdmin updated to v4.9.2 - Adminer updated to v4.7.5 - Replace dot and dashes by underscores in database names (Issue [#206](https://github.com/WordOps/WordOps/issues/206)) - Increased database name length to 32 characters from domain name + 8 random characters - typo error in motd-news script (Issue [#204](https://github.com/WordOps/WordOps/issues/204)) - Install Nginx before ngxblocker - WordOps install/update script text color - Issue with MySQL stack on Raspbian 9/10 - Typo error (PR [#205](https://github.com/WordOps/WordOps/pull/205)) - php version in `wo debug` (PR [#209](https://github.com/WordOps/WordOps/pull/209)) - SSL certificates expiration display with shared wildcard certificates
This commit is contained in:
50
wo/core/stackconf.py
Normal file
50
wo/core/stackconf.py
Normal file
@@ -0,0 +1,50 @@
|
||||
import os
|
||||
|
||||
from wo.core.logging import Log
|
||||
from wo.core.template import WOTemplate
|
||||
from wo.core.variables import WOVar
|
||||
|
||||
|
||||
class WOConf():
|
||||
"""wo stack configuration utilities"""
|
||||
def __init__():
|
||||
pass
|
||||
|
||||
def nginxcommon(self):
|
||||
"""nginx common configuration deployment"""
|
||||
wo_php_version = ["php72", "php73", "php74"]
|
||||
ngxcom = '/etc/nginx/common'
|
||||
for wo_php in wo_php_version:
|
||||
if not os.path.exists(ngxcom):
|
||||
os.mkdir(ngxcom)
|
||||
Log.debug(self, 'deploying templates for {0}'.format(wo_php))
|
||||
data = dict(upstream="{0}".format(wo_php),
|
||||
release=WOVar.wo_version)
|
||||
WOTemplate.deploy(self,
|
||||
'{0}/{1}.conf'
|
||||
.format(ngxcom, wo_php),
|
||||
'php.mustache', data)
|
||||
|
||||
WOTemplate.deploy(
|
||||
self, '{0}/redis-{1}.conf'.format(ngxcom, wo_php),
|
||||
'redis.mustache', data)
|
||||
|
||||
WOTemplate.deploy(
|
||||
self, '{0}/wpcommon-{1}.conf'.format(ngxcom, wo_php),
|
||||
'wpcommon.mustache', data)
|
||||
|
||||
WOTemplate.deploy(
|
||||
self, '{0}/wpfc-{1}.conf'.format(ngxcom, wo_php),
|
||||
'wpfc.mustache', data)
|
||||
|
||||
WOTemplate.deploy(
|
||||
self, '{0}/wpsc-{1}.conf'.format(ngxcom, wo_php),
|
||||
'wpsc.mustache', data)
|
||||
|
||||
WOTemplate.deploy(
|
||||
self, '{0}/wprocket-{1}.conf'.format(ngxcom, wo_php),
|
||||
'wprocket.mustache', data)
|
||||
|
||||
WOTemplate.deploy(
|
||||
self, '{0}/wpce-{1}.conf'.format(ngxcom, wo_php),
|
||||
'wpce.mustache', data)
|
||||
Reference in New Issue
Block a user