Skip to content

Commit

Permalink
Merge pull request #1518 from xibosignage/develop
Browse files Browse the repository at this point in the history
Release 3.3.1
  • Loading branch information
dasgarner authored Dec 13, 2022
2 parents aec4d4e + 0772353 commit 2ccc30f
Show file tree
Hide file tree
Showing 65 changed files with 2,247 additions and 469 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ ENV CMS_DEV_MODE=false \
CMS_APACHE_OPTIONS_INDEXES=false \
CMS_QUICK_CHART_URL=http://cms-quickchart:3400 \
CMS_APACHE_SERVER_TOKENS=OS \
CMS_APACHE_LOG_REQUEST_TIME=false \
CMS_USE_MEMCACHED=false \
MEMCACHED_HOST=memcached \
MEMCACHED_PORT=11211 \
Expand Down
1 change: 1 addition & 0 deletions Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ ENV CMS_DEV_MODE=true \
CMS_APACHE_OPTIONS_INDEXES=false \
CMS_QUICK_CHART_URL=http://quickchart:3400 \
CMS_APACHE_SERVER_TOKENS=OS \
CMS_APACHE_LOG_REQUEST_TIME=true \
CMS_USE_MEMCACHED=true \
MEMCACHED_HOST=memcached \
MEMCACHED_PORT=11211 \
Expand Down
10 changes: 6 additions & 4 deletions db/migrations/20221024082400_ad_campaign_migration.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,14 @@ public function change()
'length' => \Phinx\Db\Adapter\MysqlAdapter::INT_REGULAR,
'default' => 0,
])
->addColumn('spend', 'integer', [
'length' => \Phinx\Db\Adapter\MysqlAdapter::INT_REGULAR,
->addColumn('spend', 'decimal', [
'precision' => 30,
'scale' => 4,
'default' => 0,
])
->addColumn('impressions', 'integer', [
'length' => \Phinx\Db\Adapter\MysqlAdapter::INT_REGULAR,
->addColumn('impressions', 'decimal', [
'precision' => 30,
'scale' => 4,
'default' => 0,
])
->addColumn('lastPopId', 'string', [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ public function change()
$this->table('display')
->addColumn('screenSize', 'integer', ['after' => 'display', 'default' => null, 'null' => true])
->addColumn('displayTypeId', 'integer', ['after' => 'display', 'default' => null, 'null' => true])
->addColumn('impressionsPerPlay', 'integer', ['after' => 'lanIpAddress', 'default' => null, 'null' => true])
->addColumn('costPerPlay', 'integer', ['after' => 'lanIpAddress', 'default' => null, 'null' => true])
->addColumn('impressionsPerPlay', 'decimal', ['precision' => 10, 'scale' => 4, 'after' => 'lanIpAddress', 'default' => null, 'null' => true])
->addColumn('costPerPlay', 'decimal', ['precision' => 10, 'scale' => 4, 'after' => 'lanIpAddress', 'default' => null, 'null' => true])
->addColumn('isOutdoor', 'integer', ['after' => 'lanIpAddress', 'limit' => \Phinx\Db\Adapter\MysqlAdapter::INT_TINY, 'default' => 0])
->addColumn('customId', 'string', ['after' => 'lanIpAddress', 'limit' => 254, 'default' => null, 'null' => true])
->addForeignKey('displayTypeId', 'display_types', 'displayTypeId')
Expand Down
26 changes: 17 additions & 9 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

#
# Copyright (c) 2022 Xibo Signage Ltd
# Copyright (C) 2022 Xibo Signage Ltd
#
# Xibo - Digital Signage - http://www.xibo.org.uk
#
Expand Down Expand Up @@ -110,8 +110,8 @@ chown -R apache.apache /var/www/cms/library/certs
if [ -f "/var/www/backup/import.sql" ] && [ "$CMS_DEV_MODE" == "false" ]
then
echo "Attempting to import database"
echo "Importing Database"

echo "Importing Database"
mysql -D $MYSQL_DATABASE -e "SOURCE /var/www/backup/import.sql"

echo "Configuring Database Settings"
Expand Down Expand Up @@ -249,13 +249,13 @@ then

# Configure MSMTP to send emails if required
# Config lives in /etc/msmtprc

# Split CMS_SMTP_SERVER in to CMS_SMTP_SEVER_HOST : PORT
host_port=($(echo $CMS_SMTP_SERVER | tr ":" "\n"))

/bin/sed -i "s/host .*$/host ${host_port[0]}/" /etc/msmtprc
/bin/sed -i "s/port .*$/port ${host_port[1]}/" /etc/msmtprc
/bin/sed -i "s/port .*$/port ${host_port[1]}/" /etc/msmtprc

if [ -z "$CMS_SMTP_USERNAME" ] || [ "$CMS_SMTP_USERNAME" == "none" ]
then
# Use no authentication
Expand All @@ -281,7 +281,7 @@ then
else
/bin/sed -i "s/tls .*$/tls off/" /etc/msmtprc
fi

if [ "$CMS_SMTP_USE_STARTTLS" == "YES" ]
then
/bin/sed -i "s/tls_starttls .*$/tls_starttls on/" /etc/msmtprc
Expand All @@ -293,7 +293,7 @@ then
/bin/sed -i "s/domain .*$/domain $CMS_SMTP_HOSTNAME/" /etc/msmtprc

if [ "$CMS_SMTP_FROM" == "none" ]
then
then
/bin/sed -i "s/from .*$/from cms@$CMS_SMTP_REWRITE_DOMAIN/" /etc/msmtprc
else
/bin/sed -i "s/from .*$/from $CMS_SMTP_FROM/" /etc/msmtprc
Expand Down Expand Up @@ -369,6 +369,14 @@ then
sed -i "s/ServerTokens.*$/ServerTokens Prod/" /etc/apache2/conf.d/cms.conf
fi

# Configure Apache logging
if [ "$CMS_APACHE_LOG_REQUEST_TIME" == "true" ]
then
sed -i '/combined/s/^/#/' /etc/apache2/conf.d/cms.conf
else
sed -i '/requesttime/s/^/#/' /etc/apache2/conf.d/cms.conf
fi

# Run CRON in Production mode
if [ "$CMS_DEV_MODE" == "false" ]
then
Expand Down
4 changes: 4 additions & 0 deletions docker/etc/apache2/conf.d/cms.conf
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ ServerTokens OS
</Directory>

ErrorLog /dev/stderr

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" *%Ts* *%Dus*" requesttime

CustomLog /dev/stdout combined
CustomLog /dev/stdout requesttime

# Hardening
Header always append X-Frame-Options SAMEORIGIN
Expand Down
Loading

0 comments on commit 2ccc30f

Please sign in to comment.