Compare commits
51 commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
178a08ee3f | ||
![]() |
a68be24fde | ||
![]() |
d896501a3f | ||
![]() |
61349dec59 | ||
![]() |
cdaa049453 | ||
![]() |
fb5a618943 | ||
![]() |
68eb886890 | ||
![]() |
0f27d28bb6 | ||
![]() |
0ea0201343 | ||
![]() |
206506f12d | ||
![]() |
b1bacc7455 | ||
![]() |
cc5b6c301a | ||
![]() |
4c5deb14a6 | ||
![]() |
d217c06b1b | ||
![]() |
55d44f7ffb | ||
![]() |
b24ab817d3 | ||
![]() |
11718635a4 | ||
![]() |
701c1d925a | ||
![]() |
58603172b1 | ||
![]() |
e30ce8f0e9 | ||
![]() |
938559ad8f | ||
![]() |
fb6506d439 | ||
![]() |
86e50ec21c | ||
![]() |
8d2ecc11d0 | ||
![]() |
1d16f288b1 | ||
![]() |
d2dad1fd1c | ||
![]() |
b36f094edd | ||
![]() |
1f1a395382 | ||
![]() |
e120fec868 | ||
![]() |
16463a3a68 | ||
![]() |
4d7858b18b | ||
![]() |
0dce5d5374 | ||
![]() |
20fac248c1 | ||
![]() |
ad7242a30d | ||
![]() |
d593a7c126 | ||
![]() |
49fe81cc57 | ||
![]() |
8735dcd041 | ||
![]() |
5d9c6ffbf7 | ||
![]() |
2881c892d8 | ||
![]() |
eda6894863 | ||
![]() |
428e5ad3f0 | ||
![]() |
f5d33866cc | ||
![]() |
1e38669aa0 | ||
![]() |
fc94bab9d4 | ||
![]() |
bf723e0db4 | ||
![]() |
5e60d300fb | ||
![]() |
1728229fab | ||
![]() |
886bd1e38e | ||
![]() |
f47ebbf47c | ||
![]() |
932593d7bc | ||
![]() |
4f635699ac |
42 changed files with 569 additions and 315 deletions
10
.dockerignore
Normal file
10
.dockerignore
Normal file
|
@ -0,0 +1,10 @@
|
|||
.dockerignore
|
||||
.git
|
||||
.github
|
||||
**/*.DS_Store
|
||||
docker-bake.hcl
|
||||
docs
|
||||
httpd-php-dev.yml
|
||||
httpd-php.Dockerfile
|
||||
httpd-php.yml
|
||||
README.md
|
6
.gitattributes
vendored
Normal file
6
.gitattributes
vendored
Normal file
|
@ -0,0 +1,6 @@
|
|||
/.github export-ignore
|
||||
/.vscode export-ignore
|
||||
/.gitattributes export-ignore
|
||||
/.gitignore export-ignore
|
||||
|
||||
*.php diff=php
|
BIN
.github/banner/maxresdefault.jpg
vendored
Normal file
BIN
.github/banner/maxresdefault.jpg
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 50 KiB |
BIN
.github/banner/social-chevereto-blue.jpg
vendored
Normal file
BIN
.github/banner/social-chevereto-blue.jpg
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 125 KiB |
BIN
.github/banner/social_blue.png
vendored
Normal file
BIN
.github/banner/social_blue.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 222 KiB |
76
.github/workflows/httpd-php-multiarch.yml
vendored
Normal file
76
.github/workflows/httpd-php-multiarch.yml
vendored
Normal file
|
@ -0,0 +1,76 @@
|
|||
name: buildx
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
GHCR_SLUG: ghcr.io/rodber/chevereto-free
|
||||
|
||||
jobs:
|
||||
buildx:
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
operating-system: [ubuntu-latest]
|
||||
php-versions: ["7.4"]
|
||||
name: Build on PHP ${{ matrix.php-versions }} ${{ matrix.operating-system }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-versions }}
|
||||
env:
|
||||
fail-fast: true
|
||||
|
||||
# - name: Build
|
||||
# run: php src/build.php
|
||||
|
||||
- name: Docker meta
|
||||
id: meta
|
||||
uses: docker/metadata-action@v3
|
||||
with:
|
||||
images: |
|
||||
${{ env.GHCR_SLUG }}
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=ref,event=pr
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}.{{minor}}
|
||||
labels: |
|
||||
org.opencontainers.image.title=Chevereto-Free
|
||||
org.opencontainers.image.description=Chevereto-Free Image Hosting
|
||||
org.opencontainers.image.vendor=rodber
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Login to GHCR
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.repository_owner }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build
|
||||
uses: docker/bake-action@v1
|
||||
with:
|
||||
files: |
|
||||
./docker-bake.hcl
|
||||
${{ steps.meta.outputs.bake-file }}
|
||||
targets: build
|
||||
push: true
|
||||
|
||||
- name: Check manifest
|
||||
run: |
|
||||
docker buildx imagetools inspect ${{ env.GHCR_SLUG }}:${{ steps.meta.outputs.version }}
|
||||
|
||||
- name: Inspect image
|
||||
run: |
|
||||
docker pull ${{ env.GHCR_SLUG }}:${{ steps.meta.outputs.version }}
|
||||
docker image inspect ${{ env.GHCR_SLUG }}:${{ steps.meta.outputs.version }}
|
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
|
@ -42,12 +42,15 @@ jobs:
|
|||
id: get_version
|
||||
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
|
||||
|
||||
- name: Packaging
|
||||
run: |
|
||||
rm -rf .git .github .dockerignore docs app/settings.php docker-bake.hcl httpd-php-dev.yml httpd-php.Dockerfile httpd-php.yml sync.sh
|
||||
|
||||
- name: Archive dev
|
||||
uses: thedoctor0/zip-release@master
|
||||
with:
|
||||
type: "zip"
|
||||
filename: "${{ steps.get_version.outputs.VERSION }}-lite.zip"
|
||||
exclusions: "/*.git/* /*.github/*"
|
||||
|
||||
- name: Install dependencies
|
||||
run: composer install --prefer-dist --no-progress --classmap-authoritative --ignore-platform-reqs
|
||||
|
@ -57,12 +60,13 @@ jobs:
|
|||
with:
|
||||
type: "zip"
|
||||
filename: "${{ steps.get_version.outputs.VERSION }}.zip"
|
||||
exclusions: "/*.git/* /*.github/* ${{ steps.get_version.outputs.VERSION }}-lite.zip"
|
||||
exclusions: "${{ steps.get_version.outputs.VERSION }}-lite.zip"
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
allowUpdates: true
|
||||
removeArtifacts: true
|
||||
omitBodyDuringUpdate: true
|
||||
artifacts: "${{ steps.get_version.outputs.VERSION }}.zip,${{ steps.get_version.outputs.VERSION }}-lite.zip"
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
11
.gitignore
vendored
11
.gitignore
vendored
|
@ -1,3 +1,10 @@
|
|||
.DS_Store
|
||||
app/settings.php
|
||||
app/vendor
|
||||
/app/settings.php
|
||||
/app/vendor
|
||||
/content/images/users
|
||||
/content/images/system/*
|
||||
!/content/images/system/default
|
||||
/content/pages
|
||||
!/content/pages/default/
|
||||
/images/*
|
||||
!/images/.htaccess
|
||||
|
|
|
@ -31,7 +31,12 @@ Options -MultiViews
|
|||
#RewriteRule images/.+\.(gif|jpe?g|a?png|bmp|webp) content/images/system/default/404.gif [NC,L]
|
||||
RewriteRule images/.+\.(gif|jpe?g|png|bmp|webp) - [NC,L,R=404]
|
||||
|
||||
# PHP front controller
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule . index.php [L]
|
||||
|
||||
# Single PHP-entrypoint (disables direct access to .php files)
|
||||
RewriteCond %{THE_REQUEST} ^.+?\ [^?]+\.php[?\ ] [NC]
|
||||
RewriteRule \.php$ - [NC,L,F,R=404]
|
||||
</IfModule>
|
86
README.md
86
README.md
|
@ -1,93 +1,31 @@
|
|||
# Chevereto-Free
|
||||
|
||||
<img alt="Chevereto" src="content/images/system/default/logo.svg" width="100%">
|
||||
> The "Chevereto-Free" project is **archived** and superseed by "Chevereto" at [chevereto/chevereto](https://github.com/chevereto/chevereto).
|
||||
|
||||
Chevereto-Free allows you to create a full-featured image hosting website on your own server. It's your hosting and your rules, say goodbye to closures and restrictions.
|
||||
"Chevereto-Free" is not longer updated neither maintained, it holds code old as 2020 and it runs on a deprecated PHP version. Is not safe to use "Chevereto-Free".
|
||||
|
||||
## Project status
|
||||
Read about it at [Chevereto goes free](https://rodolfoberrios.com/2022/12/01/chevereto-goes-free/)
|
||||
|
||||
Starting on **2021-10** the [Chevereto](https://chevereto.com) organization won't be in charge of this project and the repo ownership will be transferred to [@rodber](https://github.com/rodber).
|
||||
Please note that most projects around "Chevereto-Free" wrongly use the word "Chevereto" to refer to the project/code. I used the name "Chevereto-Free" because the software project is different, please don't spoil it by chopping "-Free" when refering to this code.
|
||||
|
||||
## Screens
|
||||
## Summary
|
||||
|
||||

|
||||
Chevereto-Free allows you to create an image hosting website on your own server. It's your hosting and your rules, say goodbye to closures and restrictions.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## About this fork
|
||||
|
||||
Chevereto-Free is forked from [Chevereto V3.16.2](https://releases.chevereto.com/3.X/3.16/3.16.2.html) in which only basic features are preserved. This fork was created for personal usage and small communities.
|
||||
|
||||
👉 **This fork removes**
|
||||
|
||||
* Social Network Login
|
||||
* External Storage Servers
|
||||
* Likes and Followers
|
||||
* Manage Banners
|
||||
* Multi-language Support
|
||||
* Moderation
|
||||
* Bulk Content Importing
|
||||
|
||||
👉 **This fork misses**
|
||||
|
||||
* [Installer](https://github.com/chevereto/installer) tooling
|
||||
* All non-security updates added in [V3.17](https://releases.chevereto.com/3.X/3.17/3.17.2.html), [V3.18](https://releases.chevereto.com/3.X/3.18/3.18.3.html) and [V3.20](https://releases.chevereto.com/3.X/3.20/3.20.12.html) including:
|
||||
* 360 images
|
||||
* Nested albums
|
||||
* ImageMagick support
|
||||
* Improved sharing options
|
||||
* User interface upgrade
|
||||
* 12FA Support
|
||||
* CLI API
|
||||
|
||||
## Installation
|
||||
|
||||
### Requirements
|
||||
## Requirements
|
||||
|
||||
* PHP 7.4
|
||||
* MySQL 5.7 / 8 - MariaDB 10
|
||||
* Apache HTTP Web Server
|
||||
* Apache HTTP Web Server / Nginx
|
||||
* mod_rewrite
|
||||
|
||||
## Composer-based installation
|
||||
## PHP 8 support
|
||||
|
||||
* Requires [Composer](https://getcomposer.org)
|
||||
No.
|
||||
|
||||
```sh
|
||||
composer create-project rodber/chevereto-free . \
|
||||
--repository='{
|
||||
"url": "https://github.com/rodber/chevereto-free.git",
|
||||
"type": "vcs"
|
||||
}' \
|
||||
--remove-vcs \
|
||||
--ignore-platform-reqs
|
||||
```
|
||||
## Documentation
|
||||
|
||||
## Manual installation
|
||||
|
||||
* Pick the [latest release](https://github.com/rodber/chevereto-free/releases/latest)
|
||||
* Download the tagged `$TAG.zip` release artifact
|
||||
* Unzip the release in your target `public` web-server directory
|
||||
|
||||
## Updating
|
||||
|
||||
### HTTP self-update
|
||||
|
||||
* Go to `/dashboard`
|
||||
* Click on "Check for updates"
|
||||
* Follow the on-screen process
|
||||
|
||||
### Manual update
|
||||
|
||||
See [Manual Installation](#manual-installation)
|
||||
[chevereto-free.github.io](https://chevereto-free.github.io)
|
||||
|
||||
## License
|
||||
|
||||
|
|
|
@ -1,12 +1,3 @@
|
|||
<LimitExcept GET>
|
||||
<IfModule !mod_authz_core.c>
|
||||
Order Allow,Deny
|
||||
Deny from all
|
||||
</IfModule>
|
||||
<IfModule mod_authz_core.c>
|
||||
Require all denied
|
||||
</IfModule>
|
||||
</LimitExcept>
|
||||
<FilesMatch "\.(?:[Pp][Hh][Pp][345]?|[Pp][Hh][Tt][Mm][Ll])|(po|sql|html?)$">
|
||||
<IfModule !mod_authz_core.c>
|
||||
Order Allow,Deny
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
define('G_APP_NAME', 'Chevereto Free');
|
||||
define('G_APP_VERSION', '1.5.0');
|
||||
define('G_APP_VERSION', '1.6.2');
|
||||
define('G_APP_GITHUB_OWNER', 'rodber');
|
||||
define('G_APP_GITHUB_REPO', 'chevereto-free');
|
||||
define('G_APP_GITHUB_REPO_URL', 'https://github.com/' . G_APP_GITHUB_OWNER . '/' . G_APP_GITHUB_REPO);
|
||||
|
|
|
@ -1,27 +0,0 @@
|
|||
<LimitExcept GET>
|
||||
<IfModule !mod_authz_core.c>
|
||||
Order Allow,Deny
|
||||
Deny from all
|
||||
</IfModule>
|
||||
<IfModule mod_authz_core.c>
|
||||
Require all denied
|
||||
</IfModule>
|
||||
</LimitExcept>
|
||||
<FilesMatch "\.(?:[Pp][Hh][Pp][345]?|[Pp][Hh][Tt][Mm][Ll])|(po|sql|html?)$">
|
||||
<IfModule !mod_authz_core.c>
|
||||
Order Allow,Deny
|
||||
Deny from all
|
||||
</IfModule>
|
||||
<IfModule mod_authz_core.c>
|
||||
Require all denied
|
||||
</IfModule>
|
||||
</FilesMatch>
|
||||
<IfModule mod_php7.c>
|
||||
php_flag engine off
|
||||
</IfModule>
|
||||
<FilesMatch ".+\.*$">
|
||||
SetHandler !
|
||||
</FilesMatch>
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteRule ^.*\.php$ - [F,L]
|
||||
</IfModule>
|
|
@ -1,11 +1,7 @@
|
|||
<FilesMatch "\.(txt)$">
|
||||
# Apache 2.2
|
||||
<IfModule !mod_authz_core.c>
|
||||
Order Allow,Deny
|
||||
Deny from all
|
||||
</IfModule>
|
||||
# Apache 2.4
|
||||
<IfModule mod_authz_core.c>
|
||||
Require all denied
|
||||
</IfModule>
|
||||
</FilesMatch>
|
||||
<IfModule !mod_authz_core.c>
|
||||
Order Allow,Deny
|
||||
Deny from all
|
||||
</IfModule>
|
||||
<IfModule mod_authz_core.c>
|
||||
Require all denied
|
||||
</IfModule>
|
|
@ -290,13 +290,15 @@ try {
|
|||
'1.4.1' => null,
|
||||
'1.4.2' => null,
|
||||
'1.5.0' => null,
|
||||
'1.5.1' => null,
|
||||
'1.6.0' => null,
|
||||
'1.6.1' => [
|
||||
'chevereto_news' => 'a:0:{}',
|
||||
],
|
||||
'1.6.2' => null,
|
||||
];
|
||||
// Settings that must be renamed from NAME to NEW NAME and DELETE old NAME
|
||||
$settings_rename = [];
|
||||
|
||||
// Settings that must be renamed from NAME to NEW NAME and doesn't delete old NAME
|
||||
$settings_switch = [];
|
||||
|
||||
$chv_initial_settings = [];
|
||||
foreach ($settings_updates as $k => $v) {
|
||||
if (is_null($v)) {
|
||||
|
@ -304,14 +306,11 @@ try {
|
|||
}
|
||||
$chv_initial_settings += $v;
|
||||
}
|
||||
|
||||
// Detect 2.X
|
||||
try {
|
||||
$is_2X = DB::get('info', ['key' => 'version']) ? true : false;
|
||||
} catch (Exception $e) {
|
||||
$is_2X = false;
|
||||
}
|
||||
|
||||
/* Stats query from 3.7.0 up to 3.8.13 */
|
||||
$stats_query_legacy = 'TRUNCATE TABLE `%table_prefix%stats`;
|
||||
|
||||
|
@ -899,7 +898,7 @@ WHERE NOT EXISTS (SELECT * FROM `%table_prefix%imports` WHERE `import_path`='%ro
|
|||
}
|
||||
|
||||
if ($isDumpUpdate) {
|
||||
G\debug('# Dumped update query. https://v3-docs.chevereto.com/setup/update-guide.html#manual-procedure');
|
||||
G\debug('# Dumped update query. https://chevereto-free.github.io/setup/update-guide.html#manual-procedure');
|
||||
G\debug($sql_update);
|
||||
die();
|
||||
}
|
||||
|
|
|
@ -171,6 +171,8 @@ class Settings
|
|||
'moderatecontent_block_rating' => 'a',
|
||||
'moderatecontent_flag_nsfw' => 'a',
|
||||
'moderate_uploads' => '', // ,
|
||||
// 3.20.13
|
||||
'chevereto_news' => 'a:0:{}',
|
||||
];
|
||||
|
||||
$device_to_columns = [
|
||||
|
|
|
@ -17,6 +17,7 @@ namespace CHV;
|
|||
use G;
|
||||
use DirectoryIterator;
|
||||
use Exception;
|
||||
use Throwable;
|
||||
|
||||
if (!defined('access') or !access) {
|
||||
die('This file cannot be directly accessed.');
|
||||
|
@ -817,6 +818,17 @@ function checkUpdates()
|
|||
} // Silence
|
||||
}
|
||||
|
||||
function updateCheveretoNews() {
|
||||
try {
|
||||
$chevereto_news = G\fetch_url('https://blog.chevereto.com/feed.json');
|
||||
$chevereto_news = json_decode($chevereto_news)->items;
|
||||
Settings::update(['chevereto_news' => serialize($chevereto_news)]);
|
||||
} catch(Throwable $e) {
|
||||
$chevereto_news = [];
|
||||
}
|
||||
return $chevereto_news;
|
||||
}
|
||||
|
||||
function obfuscate($string)
|
||||
{
|
||||
$len = strlen($string);
|
||||
|
|
|
@ -25,14 +25,18 @@ if (!defined('access') or !access) {
|
|||
}
|
||||
|
||||
// settings.php workaround
|
||||
if (!is_readable(dirname(__FILE__) . '/settings.php')) {
|
||||
if (!@fopen(dirname(__FILE__) . '/settings.php', 'w')) {
|
||||
if (!is_readable(__DIR__ . '/settings.php')) {
|
||||
if (!@fopen(__DIR__ . '/settings.php', 'w')) {
|
||||
die("Chevereto can't create the app/settings.php file. You must manually create this file.");
|
||||
}
|
||||
}
|
||||
|
||||
if(getenv('CHEVERETO_SERVICING') == 'docker') {
|
||||
require_once __DIR__ . '/settings-env.php';
|
||||
}
|
||||
// G thing
|
||||
(file_exists(dirname(dirname(__FILE__)) . '/lib/G/G.php')) ? require_once(dirname(dirname(__FILE__)) . '/lib/G/G.php') : die("Can't find lib/G/G.php");
|
||||
(file_exists(dirname(__FILE__, 2) . '/lib/G/G.php'))
|
||||
? require_once dirname(__FILE__, 2) . '/lib/G/G.php'
|
||||
: die("Can't find lib/G/G.php");
|
||||
|
||||
// Require at least X memory to do the thing
|
||||
$min_memory = '256M';
|
||||
|
|
|
@ -73,9 +73,10 @@ $route = function ($handler) {
|
|||
}
|
||||
$route_menu['upgrade'] = [
|
||||
'label' => '<span class="btn-icon icon-star4 color-yellow"></span> <b>Upgrade</b>',
|
||||
'id' => 'upgrade'
|
||||
'id' => 'upgrade',
|
||||
'url' => 'https://chevereto-free.github.io/get-started/upgrading.html',
|
||||
];
|
||||
$handler::setVar('documentationBaseUrl', 'https://v3-docs.chevereto.com/');
|
||||
$handler::setVar('documentationBaseUrl', 'https://chevereto-free.github.io/');
|
||||
$handler::setVar($route_prefix . '_menu', $route_menu);
|
||||
$handler::setVar('tabs', $route_menu);
|
||||
|
||||
|
@ -111,6 +112,12 @@ $route = function ($handler) {
|
|||
}
|
||||
|
||||
$db = CHV\DB::getInstance();
|
||||
|
||||
$chevereto_news = unserialize(CHV\Settings::get('chevereto_news'));
|
||||
if(!is_array($chevereto_news) || $chevereto_news === []) {
|
||||
$chevereto_news = CHV\updateCheveretoNews();
|
||||
}
|
||||
$handler::setVar('chevereto_news', $chevereto_news);
|
||||
|
||||
$chv_version = [
|
||||
'files' => G\get_app_version(),
|
||||
|
@ -218,12 +225,9 @@ $route = function ($handler) {
|
|||
'flood-protection' => _s('Flood protection'),
|
||||
'theme' => _s('Theme'),
|
||||
'homepage' => _s('Homepage'),
|
||||
'banners' => _s('Banners'),
|
||||
'system' => _s('System'),
|
||||
'routing' => _s('Routing'),
|
||||
'external-storage' => _s('External storage'),
|
||||
'email' => _s('Email'),
|
||||
'social-networks' => _s('Social networks'),
|
||||
'external-services' => _s('External services'),
|
||||
'ip-bans' => _s('IP bans'),
|
||||
'api' => 'API',
|
||||
|
|
24
app/settings-env.php
Normal file
24
app/settings-env.php
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
$settings = [
|
||||
'db_driver' => getenv('CHEVERETO_DB_DRIVER'),
|
||||
'db_host' => getenv('CHEVERETO_DB_HOST'),
|
||||
'db_name' => getenv('CHEVERETO_DB_NAME'),
|
||||
'db_pass' => getenv('CHEVERETO_DB_PASS'),
|
||||
'db_pdo_attrs' => json_decode(getenv('CHEVERETO_DB_PDO_ATTRS'), true),
|
||||
'db_port' => (int) getenv('CHEVERETO_DB_PORT'),
|
||||
'db_table_prefix' => getenv('CHEVERETO_DB_TABLE_PREFIX'),
|
||||
'db_user' => getenv('CHEVERETO_DB_USER'),
|
||||
'debug_level' => (int) getenv('CHEVERETO_DEBUG_LEVEL'),
|
||||
'disable_php_pages' => (bool) getenv('CHEVERETO_DISABLE_PHP_PAGES'),
|
||||
'disable_update_http' => (bool) getenv('CHEVERETO_DISABLE_UPDATE_HTTP'),
|
||||
'disable_update_cli' => (bool) getenv('CHEVERETO_DISABLE_UPDATE_CLI'),
|
||||
'error_log' => getenv('CHEVERETO_ERROR_LOG'),
|
||||
'hostname_path' => getenv('CHEVERETO_HOSTNAME_PATH'),
|
||||
'hostname' => getenv('CHEVERETO_HOSTNAME'),
|
||||
'https' => (bool) getenv('CHEVERETO_HTTPS'),
|
||||
'image_formats_available' => json_decode(getenv('CHEVERETO_IMAGE_FORMATS_AVAILABLE'), true),
|
||||
'image_library' => getenv('CHEVERETO_IMAGE_LIBRARY'),
|
||||
'session.save_handler' => getenv('CHEVERETO_SESSION_SAVE_HANDLER'),
|
||||
'session.save_path' => getenv('CHEVERETO_SESSION_SAVE_PATH'),
|
||||
];
|
|
@ -1 +1 @@
|
|||
Check the custom hooks documentation here: https://v3-docs.chevereto.com/customization/theme.html#custom-hooks
|
||||
Check the custom hooks documentation here: https://chevereto-free.github.io/features/customization/theme.html#custom-hooks
|
|
@ -18,47 +18,9 @@ if (is_upload_allowed() && (CHV\getSetting('upload_gui') == 'js' || G\is_route('
|
|||
|
||||
<?php CHV\Render\show_theme_inline_code('snippets/footer.js'); ?>
|
||||
|
||||
<?php CHV\Render\showQueuePixel(); ?>
|
||||
|
||||
<?php CHV\Render\showPingPixel(); ?>
|
||||
|
||||
<?php echo CHV\getSetting('analytics_code'); ?>
|
||||
|
||||
<?php
|
||||
if (CHV\Login::isAdmin()) {
|
||||
?>
|
||||
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$(document).on("click", "[data-action=upgrade]", function() {
|
||||
PF.fn.modal.call({
|
||||
template: $("[data-modal=form-upgrade]").html(),
|
||||
buttons: false,
|
||||
button_submit: "Upgrade now",
|
||||
ajax: {
|
||||
data: {action: 'upgrade'},
|
||||
deferred: {
|
||||
success: function(XHR) {
|
||||
window.location.href = XHR.responseJSON.redir.url;
|
||||
},
|
||||
error: function(XHR) {
|
||||
PF.fn.growl.call(XHR.responseJSON.error.message);
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<div data-modal="form-upgrade" class="hidden">
|
||||
<span class="modal-box-title">Upgrade</span>
|
||||
<p>Upgrading to paid Chevereto enables access to all features and latest updates. This process is automated, you will only need to paste your license key.</p>
|
||||
<p>All data will remain, and you can count on support assistance.</p>
|
||||
<div class="btn-container"><button class="btn blue" data-action="submit" type="submit"><span class="btn-icon icon-next3"></span> Upgrade now</button> <a class="btn orange outline" href="https://chevereto.com/pricing" target="_blank"><span class="btn-icon icon-key3"></span> Purchase license</a></div>
|
||||
</div>
|
||||
<?php
|
||||
} ?>
|
||||
|
||||
</body>
|
||||
</html>
|
|
@ -1 +1 @@
|
|||
Check the theme overrides documentation here: https://v3-docs.chevereto.com/customization/theme.html#theme-overrides
|
||||
Check the theme overrides documentation here: https://chevereto-free.github.io/features/customization/theme.html#theme-overrides
|
|
@ -2390,4 +2390,77 @@ body.full--wh {
|
|||
|
||||
body#index.landing [data-action=top-bar-tone] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.card-wrapper {
|
||||
height: 175px;
|
||||
overflow-y: hidden;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.card-slider {
|
||||
width: calc(310px * 8);
|
||||
}
|
||||
|
||||
.card-container {
|
||||
width: 300px;
|
||||
height: 200px;
|
||||
display: block;
|
||||
float: left;
|
||||
margin: 0 5px;
|
||||
}
|
||||
|
||||
.card-container:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.card-container:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.card {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.card a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.card-header-image {
|
||||
width: 100%;
|
||||
height: 150px;
|
||||
overflow: hidden;
|
||||
border-radius: 1em;
|
||||
display: block;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.card-header-image-mask {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: block;
|
||||
background-color: rgba(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
.card-header-image:hover .card-header-image-mask {
|
||||
background-color: rgba(35, 168, 224, .8);
|
||||
}
|
||||
|
||||
.card-text {
|
||||
color: #FFF;
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 80%;
|
||||
text-shadow: 2px 2px 4px rgba(0, 0, 0, .35);
|
||||
}
|
||||
|
||||
.card-text h3 {
|
||||
font-weight: bold;
|
||||
font-size: 1.6em;
|
||||
margin-bottom: 5px;
|
||||
}
|
2
app/themes/Peafowl/style.min.css
vendored
2
app/themes/Peafowl/style.min.css
vendored
File diff suppressed because one or more lines are too long
|
@ -14,11 +14,6 @@ function get_docs_link($key, $subject)
|
|||
{
|
||||
return '<a href="' . get_documentationBaseUrl() . $key . '" target="_blank">' . $subject . '</a>';
|
||||
}
|
||||
function free_version_warning($wrap=true)
|
||||
{
|
||||
$message = _s("This functionality is not part of Chevereto Free. %s to obtain this feature.", ['%s' => '<a data-action="upgrade"><span class="btn-icon icon-star4 color-yellow"></span> ' . _s('Upgrade') . '</a>']);
|
||||
echo($wrap ? ('<div class="input-below">' . $message . '</div>') : $message);
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="content-width">
|
||||
|
@ -29,19 +24,6 @@ function free_version_warning($wrap=true)
|
|||
<h1><?php _se('Dashboard'); ?></h1>
|
||||
<?php G\Render\include_theme_file('snippets/tabs'); ?>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
$(document).ready(function(e) {
|
||||
$("#upgrade-link").attr("data-action", "upgrade").removeAttr("href");
|
||||
var $currentTab = $("li.current", ".content-tabs");
|
||||
$(document).on("click", "#upgrade-link", function(e) {
|
||||
$("#upgrade-link").closest("li").removeClass("current");
|
||||
var $tab_menu = $("[data-action=tab-menu]");
|
||||
$tab_menu.find("[data-content=current-tab-label]").text($currentTab.text());
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<?php
|
||||
switch (get_dashboard()) {
|
||||
case 'stats':
|
||||
|
@ -57,7 +39,7 @@ function free_version_warning($wrap=true)
|
|||
<p><?php _se("Make sure that you address this issue as the system relies on accurate IP detections to provide basic functionalities and to protect against spam, flooding, and brute force attacks."); ?></p>
|
||||
</div>
|
||||
<div class="dashboard-group">
|
||||
<div class="overflow-auto text-align-center margin-top-20">
|
||||
<div class="overflow-auto text-align-center margin-top-20 margin-bottom-40">
|
||||
<a href="<?php echo G\get_base_url('dashboard/images'); ?>" class="stats-block c6 fluid-column display-inline-block" <?php if (get_totals()['images'] > 999999) {
|
||||
echo ' rel="tooltip" data-tipTip="top" title="' . number_format(get_totals()['images']) . '"';
|
||||
} ?>>
|
||||
|
@ -90,6 +72,33 @@ function free_version_warning($wrap=true)
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header header-tabs no-select">
|
||||
<h2><i class="icon icon-rss"></i> <?php _se('%s News', 'Chevereto'); ?></h2>
|
||||
</div>
|
||||
|
||||
<div class="card-wrapper margin-bottom-40">
|
||||
<div class="card-slider">
|
||||
<?php foreach(array_slice(get_chevereto_news(), 0, 8) as $k => $v) {
|
||||
echo strtr('<article class="card-container">
|
||||
<div class="card">
|
||||
<a class="card-header-image" href="%url%" target="_blank" style="background-image: url(%image%);">
|
||||
<span class="animate card-header-image-mask"></span>
|
||||
<span class="card-text">
|
||||
<h3>%title%</h3>
|
||||
<span>%summary%</span>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
</article>' . "\n", [
|
||||
'%url%' => $v->url,
|
||||
'%image%' => $v->image,
|
||||
'%title%' => $v->title,
|
||||
'%summary%' => $v->summary,
|
||||
]);
|
||||
} ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul class="tabbed-content-list table-li margin-top-20">
|
||||
<li>
|
||||
<span class="c6 display-table-cell padding-right-10">GitHub<span style="opacity: 0;">:</span></span>
|
||||
|
@ -97,12 +106,6 @@ function free_version_warning($wrap=true)
|
|||
<a class="github-button" href="https://github.com/rodber/chevereto-free/subscription" data-icon="octicon-eye" data-size="large" data-show-count="true" aria-label="Watch rodber/chevereto-free on GitHub">Watch</a>
|
||||
<a class="github-button" href="https://github.com/rodber/chevereto-free" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star rodber/chevereto-free on GitHub">Star</a>
|
||||
</span>
|
||||
<div class="highlight padding-5 margin-top-10 margin-bottom-10">Chevereto-Free project ownership will be <b>transferred</b> to <a href="https://github.com/rodber" target="_blank">rodber</a> on <b>2021-10</b>.
|
||||
<ul class="list-style-type-disc padding-left-20">
|
||||
<li>The Chevereto organization won't be longer involved with the development of this project.</li>
|
||||
<li>The project repository will be available at <a href="https://github.com/rodber/chevereto-free" target="_blank">rodber/chevereto-free</a>.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
<?php
|
||||
foreach (get_system_values() as $v) {
|
||||
|
@ -404,26 +407,6 @@ function free_version_warning($wrap=true)
|
|||
<div class="input-below"><?php _se('Enables to browse images randomly.'); ?></div>
|
||||
</div>
|
||||
|
||||
<div class="input-label">
|
||||
<label for="enable_likes"><?php _se('Likes'); ?></label>
|
||||
<div class="c5 phablet-c1"><select type="text" class="text-input" disabled>
|
||||
<?php
|
||||
echo CHV\Render\get_select_options_html([1 => _s('Enabled'), 0 => _s('Disabled')], CHV\Settings::get('enable_likes')); ?>
|
||||
</select></div>
|
||||
<?php free_version_warning(); ?>
|
||||
<?php personal_mode_warning(); ?>
|
||||
</div>
|
||||
|
||||
<div class="input-label">
|
||||
<label for="enable_followers"><?php _se('Followers'); ?></label>
|
||||
<div class="c5 phablet-c1"><select type="text" class="text-input" disabled>
|
||||
<?php
|
||||
echo CHV\Render\get_select_options_html([1 => _s('Enabled'), 0 => _s('Disabled')], CHV\Settings::get('enable_followers')); ?>
|
||||
</select></div>
|
||||
<?php free_version_warning(); ?>
|
||||
<?php personal_mode_warning(); ?>
|
||||
</div>
|
||||
|
||||
<hr class="line-separator">
|
||||
|
||||
<div class="input-label">
|
||||
|
@ -1427,14 +1410,6 @@ function free_version_warning($wrap=true)
|
|||
</select></div>
|
||||
<div class="input-below"><?php _se('Enable this if you want to apply a blur effect on the NSFW images in listings.'); ?></div>
|
||||
</div>
|
||||
<div class="input-label">
|
||||
<label><?php _se('Show banners in not safe content'); ?></label>
|
||||
<div class="c5 phablet-c1"><select type="text" class="text-input" disabled>
|
||||
<?php
|
||||
echo CHV\Render\get_select_options_html([1 => _s('Enabled'), 0 => _s('Disabled')], CHV\Settings::get('show_banners_in_nsfw')); ?>
|
||||
</select></div>
|
||||
<?php free_version_warning(); ?>
|
||||
</div>
|
||||
|
||||
<div class="input-label">
|
||||
<label for="show_nsfw_in_random_mode"><?php _se('Show not safe content in random mode'); ?></label>
|
||||
|
@ -1896,10 +1871,6 @@ function free_version_warning($wrap=true)
|
|||
|
||||
<?php
|
||||
} ?>
|
||||
|
||||
<?php if (get_settings()['key'] == 'banners') {
|
||||
free_version_warning();
|
||||
} ?>
|
||||
<?php if (get_settings()['key'] == 'system') {
|
||||
?>
|
||||
<p><?php echo read_the_docs_settings('system', _s('system')); ?></p>
|
||||
|
@ -2010,10 +1981,6 @@ function free_version_warning($wrap=true)
|
|||
</div>
|
||||
<?php
|
||||
} ?>
|
||||
|
||||
<?php if (get_settings()['key'] == 'external-storage') {
|
||||
free_version_warning();
|
||||
} ?>
|
||||
<?php if (get_settings()['key'] == 'email') {
|
||||
?>
|
||||
<p><?php echo read_the_docs_settings('email', _s('email')); ?></p>
|
||||
|
@ -2146,10 +2113,6 @@ function free_version_warning($wrap=true)
|
|||
<?php
|
||||
} ?>
|
||||
|
||||
<?php if (get_settings()['key'] == 'social-networks') {
|
||||
free_version_warning();
|
||||
} ?>
|
||||
|
||||
<?php if (get_settings()['key'] == 'external-services') {
|
||||
?>
|
||||
<p><?php echo read_the_docs_settings('external-services', _s('external services')); ?></p>
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
</div>
|
||||
<div class="clear-both">
|
||||
<h3><?php _se('Advanced options'); ?></h3>
|
||||
<p><?php _se('The plugin has a large set of additional options that allow full customization. You can use custom HTML, CSS, own color palette, set observers and more. Check the %d and the plugin source to get a better idea of these advanced options.', ['%d' => '<a href="https://v3-docs.chevereto.com/features/PUP.html" target="_blank">' . _s('documentation') . '</a>']); ?></p>
|
||||
<p><?php _se('The plugin has a large set of additional options that allow full customization. You can use custom HTML, CSS, own color palette, set observers and more. Check the %d and the plugin source to get a better idea of these advanced options.', ['%d' => '<a href="https://chevereto-free.github.io/features/PUP.html" target="_blank">' . _s('documentation') . '</a>']); ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -52,6 +52,7 @@ if (
|
|||
$lock = new Lock('check-updates');
|
||||
if ($lock->create()) {
|
||||
checkUpdates();
|
||||
updateCheveretoNews();
|
||||
$lock->destroy();
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
|
|
|
@ -29,5 +29,7 @@
|
|||
"config": {
|
||||
"optimize-autoloader": true,
|
||||
"vendor-dir": "app/vendor"
|
||||
}
|
||||
}
|
||||
},
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true
|
||||
}
|
||||
|
|
30
composer.lock
generated
30
composer.lock
generated
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "02c88da425ef4e127747234dafda7c62",
|
||||
"content-hash": "80254179b7ca91fb12cb7444300fb8a5",
|
||||
"packages": [
|
||||
{
|
||||
"name": "jbroadway/urlify",
|
||||
|
@ -69,16 +69,16 @@
|
|||
},
|
||||
{
|
||||
"name": "mlocati/ip-lib",
|
||||
"version": "1.17.0",
|
||||
"version": "1.17.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/mlocati/ip-lib.git",
|
||||
"reference": "db9552c3460d5fa19a4c8183767fe89da7752a4e"
|
||||
"reference": "28763c87f9a3e24ff4df9258ec4e8375d8fa6523"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/mlocati/ip-lib/zipball/db9552c3460d5fa19a4c8183767fe89da7752a4e",
|
||||
"reference": "db9552c3460d5fa19a4c8183767fe89da7752a4e",
|
||||
"url": "https://api.github.com/repos/mlocati/ip-lib/zipball/28763c87f9a3e24ff4df9258ec4e8375d8fa6523",
|
||||
"reference": "28763c87f9a3e24ff4df9258ec4e8375d8fa6523",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -124,7 +124,7 @@
|
|||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/mlocati/ip-lib/issues",
|
||||
"source": "https://github.com/mlocati/ip-lib/tree/1.17.0"
|
||||
"source": "https://github.com/mlocati/ip-lib/tree/1.17.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -136,7 +136,7 @@
|
|||
"type": "other"
|
||||
}
|
||||
],
|
||||
"time": "2021-08-03T15:42:09+00:00"
|
||||
"time": "2021-11-10T15:24:32+00:00"
|
||||
},
|
||||
{
|
||||
"name": "mobiledetect/mobiledetectlib",
|
||||
|
@ -202,16 +202,16 @@
|
|||
},
|
||||
{
|
||||
"name": "phpmailer/phpmailer",
|
||||
"version": "v6.5.1",
|
||||
"version": "v6.5.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPMailer/PHPMailer.git",
|
||||
"reference": "dd803df5ad7492e1b40637f7ebd258fee5ca7355"
|
||||
"reference": "baeb7cde6b60b1286912690ab0693c7789a31e71"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/dd803df5ad7492e1b40637f7ebd258fee5ca7355",
|
||||
"reference": "dd803df5ad7492e1b40637f7ebd258fee5ca7355",
|
||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/baeb7cde6b60b1286912690ab0693c7789a31e71",
|
||||
"reference": "baeb7cde6b60b1286912690ab0693c7789a31e71",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -268,7 +268,7 @@
|
|||
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
|
||||
"support": {
|
||||
"issues": "https://github.com/PHPMailer/PHPMailer/issues",
|
||||
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.1"
|
||||
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.3"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
@ -276,7 +276,7 @@
|
|||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-08-18T09:14:16+00:00"
|
||||
"time": "2021-11-25T16:34:11+00:00"
|
||||
},
|
||||
{
|
||||
"name": "tijsverkoyen/akismet",
|
||||
|
@ -324,9 +324,9 @@
|
|||
],
|
||||
"packages-dev": [],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"minimum-stability": "dev",
|
||||
"stability-flags": [],
|
||||
"prefer-stable": false,
|
||||
"prefer-stable": true,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
"php": "~7.4",
|
||||
|
|
|
@ -1,13 +1,18 @@
|
|||
<Files .*>
|
||||
# Apache 2.2
|
||||
<FilesMatch "\.(?:[Pp][Hh][Pp][345]?|[Pp][Hh][Tt][Mm][Ll])|(po|sql|html?)$">
|
||||
<IfModule !mod_authz_core.c>
|
||||
Order Allow,Deny
|
||||
Deny from all
|
||||
</IfModule>
|
||||
# Apache 2.4
|
||||
<IfModule mod_authz_core.c>
|
||||
Require all denied
|
||||
</IfModule>
|
||||
</Files>
|
||||
|
||||
SetHandler default-handler
|
||||
</IfModule>
|
||||
</FilesMatch>
|
||||
<IfModule mod_php7.c>
|
||||
php_flag engine off
|
||||
</IfModule>
|
||||
<FilesMatch ".+\.*$">
|
||||
SetHandler !
|
||||
</FilesMatch>
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteRule ^.*\.php$ - [F,L]
|
||||
</IfModule>
|
|
@ -1,4 +0,0 @@
|
|||
<FilesMatch "\.php$">
|
||||
Order Deny,Allow
|
||||
Deny from all
|
||||
</FilesMatch>
|
11
docker-bake.hcl
Normal file
11
docker-bake.hcl
Normal file
|
@ -0,0 +1,11 @@
|
|||
target "docker-metadata-action" {}
|
||||
|
||||
target "build" {
|
||||
inherits = ["docker-metadata-action"]
|
||||
context = "./"
|
||||
dockerfile = "httpd-php.Dockerfile"
|
||||
platforms = [
|
||||
"linux/amd64",
|
||||
"linux/arm64",
|
||||
]
|
||||
}
|
51
httpd-php-dev.yml
Normal file
51
httpd-php-dev.yml
Normal file
|
@ -0,0 +1,51 @@
|
|||
version: "3.2"
|
||||
|
||||
services:
|
||||
database:
|
||||
container_name: chevereto-free-dev_database
|
||||
image: mariadb:focal
|
||||
networks:
|
||||
- chevereto
|
||||
volumes:
|
||||
- database:/var/lib/mysql
|
||||
restart: always
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: password
|
||||
MYSQL_DATABASE: chevereto
|
||||
MYSQL_USER: chevereto
|
||||
MYSQL_PASSWORD: user_database_password
|
||||
|
||||
app:
|
||||
container_name: chevereto-free-dev_app
|
||||
image: ghcr.io/rodber/chevereto-free:1.6
|
||||
networks:
|
||||
- chevereto
|
||||
volumes:
|
||||
- storage:/var/www/html/images/
|
||||
- content:/var/www/html/content/
|
||||
- app:/var/www/html/
|
||||
- type: bind
|
||||
source: ${SOURCE}
|
||||
target: /var/www/chevereto-free
|
||||
ports:
|
||||
- 8910:80
|
||||
restart: always
|
||||
environment:
|
||||
CHEVERETO_TAG: dev
|
||||
CHEVERETO_DB_HOST: database
|
||||
CHEVERETO_DB_USER: chevereto
|
||||
CHEVERETO_DB_PASS: user_database_password
|
||||
CHEVERETO_DB_PORT: 3306
|
||||
CHEVERETO_DB_NAME: chevereto
|
||||
CHEVERETO_DISABLE_UPDATE_HTTP: 1
|
||||
CHEVERETO_DISABLE_UPDATE_CLI: 1
|
||||
CHEVERETO_HTTPS: 0
|
||||
|
||||
volumes:
|
||||
database:
|
||||
content:
|
||||
storage:
|
||||
app:
|
||||
|
||||
networks:
|
||||
chevereto:
|
86
httpd-php.Dockerfile
Normal file
86
httpd-php.Dockerfile
Normal file
|
@ -0,0 +1,86 @@
|
|||
FROM composer:latest as composer
|
||||
FROM php:7.4-apache
|
||||
COPY --from=composer /usr/bin/composer /usr/local/bin/composer
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libfreetype6-dev \
|
||||
libjpeg62-turbo-dev \
|
||||
libpng-dev \
|
||||
libwebp-dev \
|
||||
libgd-dev \
|
||||
libzip-dev \
|
||||
zip \
|
||||
unzip \
|
||||
imagemagick libmagickwand-dev --no-install-recommends \
|
||||
&& docker-php-ext-configure gd \
|
||||
--with-freetype=/usr/include/ \
|
||||
--with-jpeg=/usr/include/ \
|
||||
--with-webp=/usr/include/ \
|
||||
&& docker-php-ext-configure opcache --enable-opcache \
|
||||
&& docker-php-ext-install -j$(nproc) exif gd pdo_mysql zip opcache \
|
||||
&& pecl install imagick \
|
||||
&& docker-php-ext-enable imagick opcache \
|
||||
&& php -m
|
||||
|
||||
RUN apt-get install -y \
|
||||
rsync \
|
||||
inotify-tools \
|
||||
&& a2enmod rewrite
|
||||
|
||||
ARG CHEVERETO_SOFTWARE=chevereto
|
||||
ARG CHEVERETO_TAG=free
|
||||
ARG CHEVERETO_SERVICING=docker
|
||||
|
||||
ENV CHEVERETO_SOFTWARE=$CHEVERETO_SOFTWARE \
|
||||
CHEVERETO_TAG=$CHEVERETO_TAG \
|
||||
CHEVERETO_SERVICING=$CHEVERETO_SERVICING \
|
||||
CHEVERETO_DB_HOST=mariadb \
|
||||
CHEVERETO_DB_USER=chevereto \
|
||||
CHEVERETO_DB_PASS=user_database_password \
|
||||
CHEVERETO_DB_NAME=chevereto \
|
||||
CHEVERETO_DB_TABLE_PREFIX=chv_ \
|
||||
CHEVERETO_DB_PORT=3306 \
|
||||
CHEVERETO_DB_DRIVER=mysql \
|
||||
CHEVERETO_DB_PDO_ATTRS=[] \
|
||||
CHEVERETO_DEBUG_LEVEL=1 \
|
||||
CHEVERETO_DISABLE_PHP_PAGES=1 \
|
||||
CHEVERETO_DISABLE_UPDATE_HTTP=1 \
|
||||
CHEVERETO_DISABLE_UPDATE_CLI=1 \
|
||||
CHEVERETO_ERROR_LOG=/dev/stderr \
|
||||
CHEVERETO_IMAGE_FORMATS_AVAILABLE=JPG,PNG,BMP,GIF,WEBP \
|
||||
CHEVERETO_IMAGE_LIBRARY=gd \
|
||||
CHEVERETO_HTTPS=1 \
|
||||
CHEVERETO_HOSTNAME=localhost \
|
||||
CHEVERETO_HOSTNAME_PATH=/ \
|
||||
CHEVERETO_SESSION_SAVE_HANDLER=files \
|
||||
CHEVERETO_SESSION_SAVE_PATH=/tmp \
|
||||
CHEVERETO_UPLOAD_MAX_FILESIZE=64M \
|
||||
CHEVERETO_POST_MAX_SIZE=64M \
|
||||
CHEVERETO_MAX_EXECUTION_TIME=30 \
|
||||
CHEVERETO_MEMORY_LIMIT=512M
|
||||
|
||||
RUN set -eux; \
|
||||
{ \
|
||||
echo "log_errors = On"; \
|
||||
echo "error_log = /dev/stderr"; \
|
||||
echo "upload_max_filesize = \${CHEVERETO_UPLOAD_MAX_FILESIZE}"; \
|
||||
echo "post_max_size = \${CHEVERETO_POST_MAX_SIZE}"; \
|
||||
echo "max_execution_time = \${CHEVERETO_MAX_EXECUTION_TIME}"; \
|
||||
echo "memory_limit = \${CHEVERETO_MEMORY_LIMIT}"; \
|
||||
} > $PHP_INI_DIR/conf.d/php.ini
|
||||
|
||||
VOLUME /var/www/html/content
|
||||
VOLUME /var/www/html/images
|
||||
|
||||
COPY . /var/www/html
|
||||
RUN rm /var/www/html/sync.sh
|
||||
RUN composer install \
|
||||
--working-dir=/var/www/html \
|
||||
--prefer-dist \
|
||||
--no-progress \
|
||||
--classmap-authoritative \
|
||||
--ignore-platform-reqs
|
||||
RUN chown www-data: /var/www/html -R
|
||||
COPY sync.sh /var/www/sync.sh
|
||||
RUN chmod +x /var/www/sync.sh
|
||||
CMD ["/bin/bash", "apache2-foreground"]
|
46
httpd-php.yml
Normal file
46
httpd-php.yml
Normal file
|
@ -0,0 +1,46 @@
|
|||
version: "3.2"
|
||||
|
||||
services:
|
||||
database:
|
||||
container_name: chevereto-free_database
|
||||
image: mariadb:focal
|
||||
networks:
|
||||
- chevereto
|
||||
volumes:
|
||||
- database:/var/lib/mysql
|
||||
restart: always
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: password
|
||||
MYSQL_DATABASE: chevereto
|
||||
MYSQL_USER: chevereto
|
||||
MYSQL_PASSWORD: user_database_password
|
||||
|
||||
chevereto:
|
||||
container_name: chevereto-free_app
|
||||
image: ghcr.io/rodber/chevereto-free:1.6
|
||||
networks:
|
||||
- chevereto
|
||||
volumes:
|
||||
- storage:/var/www/html/images/
|
||||
- content:/var/www/html/content/
|
||||
ports:
|
||||
- 8810:80
|
||||
restart: always
|
||||
environment:
|
||||
CHEVERETO_TAG: "free"
|
||||
CHEVERETO_DB_HOST: database
|
||||
CHEVERETO_DB_USER: chevereto
|
||||
CHEVERETO_DB_PASS: user_database_password
|
||||
CHEVERETO_DB_PORT: 3306
|
||||
CHEVERETO_DB_NAME: chevereto
|
||||
CHEVERETO_DISABLE_UPDATE_HTTP: 1
|
||||
CHEVERETO_DISABLE_UPDATE_CLI: 1
|
||||
CHEVERETO_HTTPS: 0
|
||||
|
||||
volumes:
|
||||
database:
|
||||
content:
|
||||
storage:
|
||||
|
||||
networks:
|
||||
chevereto:
|
|
@ -1,12 +1,3 @@
|
|||
<LimitExcept GET>
|
||||
<IfModule !mod_authz_core.c>
|
||||
Order Allow,Deny
|
||||
Deny from all
|
||||
</IfModule>
|
||||
<IfModule mod_authz_core.c>
|
||||
Require all denied
|
||||
</IfModule>
|
||||
</LimitExcept>
|
||||
<FilesMatch "\.(?:[Pp][Hh][Pp][345]?|[Pp][Hh][Tt][Mm][Ll])|(po|sql|html?)$">
|
||||
<IfModule !mod_authz_core.c>
|
||||
Order Allow,Deny
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
<IfModule !mod_authz_core.c>
|
||||
Order Allow,Deny
|
||||
Deny from all
|
||||
</IfModule>
|
||||
<IfModule mod_authz_core.c>
|
||||
Require all denied
|
||||
</IfModule>
|
|
@ -598,7 +598,7 @@ namespace G {
|
|||
2 => 'debug @ print',
|
||||
3 => 'debug @ print,`error_log`',
|
||||
];
|
||||
$internal_error .= ' [' . $table[$debug_level] . '] - https://v3-docs.chevereto.com/setup/debug.html';
|
||||
$internal_error .= ' [' . $table[$debug_level] . '] - https://chevereto-free.github.io/manual/troubleshooting/debug.html';
|
||||
set_status_header($internal_code);
|
||||
if (!in_array($debug_level, [0, 1, 2, 3])) {
|
||||
$debug_level = 1;
|
||||
|
@ -606,7 +606,7 @@ namespace G {
|
|||
if (in_array($debug_level, [1, 3])) {
|
||||
error_log($e);
|
||||
}
|
||||
if (!in_array($debug_level, [2, 3])) { // No print here
|
||||
if (!in_array($debug_level, [2, 3])) {
|
||||
die($internal_error);
|
||||
}
|
||||
$message = [$internal_error];
|
||||
|
@ -1648,7 +1648,7 @@ namespace G {
|
|||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($ch, CURLOPT_AUTOREFERER, 1);
|
||||
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
|
||||
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
|
||||
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
|
||||
curl_setopt($ch, CURLOPT_HEADER, 0);
|
||||
curl_setopt($ch, CURLOPT_FAILONERROR, 0);
|
||||
curl_setopt($ch, CURLOPT_ENCODING, 'gzip');
|
||||
|
@ -1689,7 +1689,7 @@ namespace G {
|
|||
}
|
||||
} else {
|
||||
$context = stream_context_create([
|
||||
'http' => ['ignore_errors' => true],
|
||||
'http' => ['ignore_errors' => true, 'follow_location' => false],
|
||||
]);
|
||||
$result = @file_get_contents($url, false, $context);
|
||||
if (!$result) {
|
||||
|
@ -1718,7 +1718,7 @@ namespace G {
|
|||
curl_setopt($ch, CURLOPT_NOBODY, 1);
|
||||
curl_setopt($ch, CURLOPT_AUTOREFERER, 1);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
|
||||
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
|
||||
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.81 Safari/537.36');
|
||||
// Inject custom options
|
||||
|
|
|
@ -2131,6 +2131,7 @@ html:not(.phone) .pop-box-menu a:hover,
|
|||
right: 0;
|
||||
z-index: 400;
|
||||
width: 100%;
|
||||
border-bottom: none;
|
||||
-webkit-transition: transform 250ms ease, border 400ms ease;
|
||||
-webkit-transition: border 400ms ease, -webkit-transform 250ms ease;
|
||||
transition: border 400ms ease, -webkit-transform 250ms ease;
|
||||
|
@ -2155,15 +2156,6 @@ html:not(.phone) .pop-box-menu a:hover,
|
|||
background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjg3Ii8+CiAgICA8c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwMDAwMDAiIHN0b3Atb3BhY2l0eT0iMC44NyIvPgogIDwvbGluZWFyR3JhZGllbnQ+CiAgPHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
|
||||
}
|
||||
|
||||
.top-bar.white,
|
||||
.follow-scroll-wrapper.position-fixed {
|
||||
border-bottom: 1px solid rgba(0, 0, 0, .1);
|
||||
}
|
||||
|
||||
.top-bar.white.transparent {
|
||||
border-bottom-color: transparent;
|
||||
}
|
||||
|
||||
.top-bar.white,
|
||||
.follow-scroll-wrapper.position-fixed,
|
||||
.top-bar-box-shadow-none .top-bar.white {
|
||||
|
@ -2176,11 +2168,6 @@ html:not(.phone) .pop-box-menu a:hover,
|
|||
backface-visibility: hidden;
|
||||
}
|
||||
|
||||
.tone-dark.top-bar-black .follow-scroll-wrapper.position-fixed {
|
||||
border-bottom: 1px solid #212121;
|
||||
border-bottom: 1px solid rgba(255, 255, 255, .09);
|
||||
}
|
||||
|
||||
.ie9 .top-bar.white {
|
||||
-webkit-filter: none;
|
||||
filter: none;
|
||||
|
@ -2809,7 +2796,6 @@ html:not(.phone) .pop-box-menu a:hover,
|
|||
* ---------------------------------------------
|
||||
*/
|
||||
.header {
|
||||
border-bottom: 1px solid #E5E5E5;
|
||||
height: 50px;
|
||||
position: relative;
|
||||
overflow: visible;
|
||||
|
|
2
lib/Peafowl/peafowl.min.css
vendored
2
lib/Peafowl/peafowl.min.css
vendored
File diff suppressed because one or more lines are too long
37
sync.sh
Normal file
37
sync.sh
Normal file
|
@ -0,0 +1,37 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
SOURCE=/var/www/chevereto-free/
|
||||
TARGET=/var/www/html/
|
||||
EXCLUDE="\.git|\.DS_Store|\/docs"
|
||||
cp "${SOURCE}".gitignore "${TARGET}".gitignore
|
||||
function sync() {
|
||||
cp "${SOURCE}"sync.sh /var/www/sync.sh
|
||||
rsync -r -I -og \
|
||||
--chown=www-data:www-data \
|
||||
--info=progress2 \
|
||||
--exclude '.git' \
|
||||
--include 'content/images/system/default/*' \
|
||||
--include 'content/pages/default/*' \
|
||||
--exclude 'sync.sh' \
|
||||
--exclude 'content/images/system/*' \
|
||||
--exclude 'content/images/users/*' \
|
||||
--exclude 'content/pages/*' \
|
||||
--filter=':- .gitignore' \
|
||||
--filter=':- .dockerignore' \
|
||||
--delete \
|
||||
$SOURCE $TARGET
|
||||
}
|
||||
sync
|
||||
inotifywait \
|
||||
--event create \
|
||||
--event delete \
|
||||
--event modify \
|
||||
--event move \
|
||||
--format "%e %w%f" \
|
||||
--exclude $EXCLUDE \
|
||||
--monitor \
|
||||
--recursive \
|
||||
$SOURCE |
|
||||
while read CHANGED; do
|
||||
sync
|
||||
done
|
Loading…
Add table
Reference in a new issue