Skip to content

Commit

Permalink
Merge branch 'master' into feature/55-dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
johanjanssens committed Jun 6, 2022
2 parents 9094645 + e5b09eb commit 21613e5
Show file tree
Hide file tree
Showing 10 changed files with 57 additions and 150 deletions.
31 changes: 6 additions & 25 deletions .github/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN go get -d -v github.com/mailhog/mhsendmail \
##

#FROM jt-base AS base
FROM ghcr.io/joomlatools/jt-base:latest AS base
FROM ghcr.io/joomlatools/jt-base:latest AS build

# Set arg defaults
ARG DEBIAN_FRONTEND=noninteractive
Expand All @@ -37,7 +37,10 @@ RUN apt-get install -y --no-install-recommends sudo
# Install MySQL
COPY ./config/s6/mysql-init.d /etc/mysql-init.d/
COPY ./config/mysql /etc/mysql/
RUN apt-get install -y --no-install-recommends mysql-server php8.1-mysql php8.1-mysqli
RUN apt-get install -y --no-install-recommends mysql-server php8.1-mysql php8.1-mysqli php8.1-gd && \
rm -rf /var/lib/mysql && \
/bin/bash -e /var/scripts/apt_clean.sh && \
/bin/bash -e /var/scripts/apt_purge.sh;

# Install Console
COPY ./config/console /root/.joomlatools/console/
Expand All @@ -48,26 +51,10 @@ COPY ./config/folioshell /root/.foliolabs/folioshell/
# Install jtctl
COPY ./bin/jtctl /usr//bin/jtctl

##
# Stage: build
##
FROM scratch AS build

ENV APP_DATA=/srv/www \
APP_ROOT=/var/www \
APP_VOLUME=/mnt/www \
APP_USER=www-data

# Copy all from build
COPY --from=base / .

# Copy mhsendmail from the builder
COPY --from=builder /go/src/github.com/mailhog/mhsendmail/mhsendmail /usr/bin/mhsendmail
RUN chmod +x /usr/bin/mhsendmail

# Remove copied files
RUN rm -rf $APP_ROOT/*

# Remove services
RUN rm -rf /usr/bin/apache_exporter
RUN rm -rf /usr/bin/php-fpm_exporter
Expand All @@ -91,9 +78,6 @@ RUN rm /etc/services.d/fastcgi/down
RUN rm /etc/services.d/file/down
RUN rm /etc/services.d/phpfpm/down

# Remove MySQL default databas
RUN rm -rf /var/lib/mysql

# Clean up apt cache and temp files to save disk space
RUN /bin/bash -e /var/scripts/apt_clean.sh;
RUN /bin/bash -e /var/scripts/apt_purge.sh;
Expand All @@ -112,7 +96,4 @@ ENV APP_DATA=/srv/www \

ENV COMPOSER_ALLOW_SUPERUSER=1 \
COMPOSER_HOME=/tmp \
COMPOSER_NO_DEV=1

# App
COPY --chown=$APP_USER:$APP_USER ./ $APP_ROOT
COMPOSER_NO_DEV=1
27 changes: 0 additions & 27 deletions config/composer.json

This file was deleted.

1 change: 0 additions & 1 deletion config/composer.stub

This file was deleted.

10 changes: 10 additions & 0 deletions config/composer/pages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"require": {
"phpmailer/phpmailer": "^6.5",
"michelf/php-markdown": "^1.9",
"voku/html-min": "^4.0",
"matthiasmullie/minify": "^1.3",
"joomlatools/framework": "dev-master as 3.5.x-dev",
"joomlatools/pages": "dev-master as 0.22.x-dev"
}
}
6 changes: 6 additions & 0 deletions config/composer/shell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"require": {
"foliolabs/folioshell": "dev-feature/10-refactor as 1.1.x-dev",
"joomlatools/console": "dev-master as 1.6.x-dev"
}
}
21 changes: 0 additions & 21 deletions config/koowa.php

This file was deleted.

File renamed without changes.
69 changes: 0 additions & 69 deletions config/pages.php

This file was deleted.

14 changes: 7 additions & 7 deletions config/koowa/default.php → config/vendor/koowa.php
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
<?php

// Set default config
return [

/* Site */
'sitename' => 'Joomlatools Server',
'list_limit' => '20',

/* Locale */
'offset' => 'UTC',
'language' => 'en-GB',
'offset' => 'UTC',
'language' => 'en-GB',

/* Mail */
/* Mail */
'mailer' => 'smtp',
'mailfrom' => '[email protected]',
'fromname' => 'Joomlatools',
Expand All @@ -23,10 +22,11 @@
'smtpport' => '1025',
'smtpsecure' => 'none',

/* Cache */
'caching' => getenv('APP_CACHE') !== false ? filter_var( getenv('APP_CACHE') , FILTER_VALIDATE_BOOLEAN) : true,
/* Cache */
'caching' => getenv('APP_CACHE') !== false ? filter_var( getenv('APP_CACHE') , FILTER_VALIDATE_BOOLEAN) : true,
'lifetime' => '15',

/* Debug */
/* Debug */
'debug' => getenv('APP_DEBUG') !== false ? filter_var( getenv('APP_DEBUG') , FILTER_VALIDATE_BOOLEAN) : false,
'secret' => getenv('APP_NONCE')
];
28 changes: 28 additions & 0 deletions config/vendor/pages.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php
ini_set('display_errors', getenv('APP_DEBUG'));

return array(
'environment' => getenv('APP_ENV'),
'script_name' => '', //remove index.php

'cache_path' => getenv('APP_VOLUME').'/sites/'.basename(PAGES_SITE_ROOT).'/cache',
'log_path' => getenv('APP_VOLUME').'/sites/'.basename(PAGES_SITE_ROOT).'/log',

'http_cache' => getenv('APP_CACHE') !== false ? filter_var(getenv('APP_CACHE'), FILTER_VALIDATE_BOOLEAN) : true,
'http_cache_time' => '1week',
'http_cache_time_browser' => '1day',

'http_client_cache' => getenv('APP_CACHE') !== false ? filter_var(getenv('APP_CACHE'), FILTER_VALIDATE_BOOLEAN) : true,

//'page_cache_validation' => filter_var(getenv('APP_CACHE'), FILTER_VALIDATE_BOOLEAN),
//'template_cache_validation' => filter_var(getenv('APP_CACHE'), FILTER_VALIDATE_BOOLEAN),
//'data_cache_validation' => filter_var(getenv('APP_CACHE'), FILTER_VALIDATE_BOOLEAN),

'aliases' => [
'theme://' => 'base://theme/',
'images://' => 'base://images/',

'assets://css/debugger' => 'https://files.joomlatools.com/joomlatools-framework/resources/assets/css/debugger',
'assets://js/debugger' => 'https://files.joomlatools.com/joomlatools-framework/resources/assets/js/debugger',
],
);

0 comments on commit 21613e5

Please sign in to comment.