Giter VIP home page Giter VIP logo

installer's Introduction

Installer

🔔 Subscribe to don't miss any update regarding Chevereto.

Chevereto

Community

Chevereto

The Installer is a single .php file that installs Chevereto. It is an API client which interacts with chevereto.com API for providing Chevereto installation.

⚠️ Beta notice

Important: Chevereto V4 is still beta software. We don't recommend using this software except for development/testing purposes.

If the software doesn't work for you please don't panic and Open a Ticket.

Happy testing!

Features

  • HTTP / CLI API
  • Checks for system requirements
  • Database checks
  • Auto-generated Nginx server rules

Documentation

installer's People

Contributors

rodber avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

installer's Issues

Timeouts in extracting step

image

In small machines the extraction step is being prematurely killed by the max_execution_time hard-cap when not allowing the Installer to use set_time_limit(0).

We should consider to stop recommending using the Installer in shared hosting, meaning that we need a new packaging for V3.X (one where the user can extract the software directly to a working path without having the extra "chevereto" folder).

As most shared hosting do include a file manager, the extraction step could be carried directly there.

Issues with MultiPHP Manager

cPanel provides PHP selection using MultiPHP Manager. This allow the user to select the target PHP version for any managed website.

When the default version is PHP < 7 (i.e, ea-php56), any change in the .htaccess file located in the target document root will revert PHP to the system default, making the installer to fail to complete the process.

cPanel switch PHP versions using .htaccess files, it looks like this when it forces a PHP version:

# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php72” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php72 .php .php7 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit

The installer should keep the cPanel generated lines of the .htaccess file before the extraction process and after the extraction it should re-patch the file.

This not only helps to keep MultiPHP manager working, but to carry any other settings that may get injected using .htaccess.

Remark cPanel support

This software supports cPanel API and provides database automatically for those.

Need to remark that for cPanel users.

Error JSON

400 Bad request

Your browser sent an invalid request.

Remark on intended usage

Note: This is our former preferred installation method, it should be used only if not feasible to rely in other alternatives.

The problem with this is the HTTP layer. As the application size increases, it shows more errors related to timeouts in the download and/or zip extraction process. It became unreliable for our users so we migrated to the VPS/manual provisioning.

The only context where we still use this Installer is for our cloud marketplace listings (not our SaaS, refer to the marketplace listings on Linode and Vultr).

Error: Unable to parse server response.

Error: Unable to parse server response. The installer is expecting a JSON response, but your server thrown this:

<title>pasty.eu | 504: Gateway time-out</title>
<div id="cf-error-details" class="p-0">
    <header class="mx-auto pt-10 lg:pt-6 lg:px-8 w-240 lg:w-full mb-8">
        <h1 class="inline-block sm:block sm:mb-2 font-light text-60 lg:text-4xl text-black-dark leading-tight mr-2">
          
          <span class="cf-error-type">Error</span>
          <span class="cf-error-code">504</span>
        </h1>
        <span class="inline-block sm:block font-mono text-15 lg:text-sm lg:leading-relaxed">Ray ID: 5df10172fb86ffb8 &bull;</span>
        <span class="inline-block sm:block font-mono text-15 lg:text-sm lg:leading-relaxed">2020-10-08 15:49:21 UTC</span>
        <h2 class="text-gray-600 leading-1.3 text-3xl font-light">Gateway time-out</h2>
    </header>
    
    <div class="my-8 bg-gradient-gray">
        <div class="w-240 lg:w-full mx-auto">
            <div class="clearfix md:px-8">
You

Browser

Working
Warsaw

Cloudflare

Working
pasty.eu

Host

Error
            </div>
          
        </div>
    </div>

    <div class="w-240 lg:w-full mx-auto mb-8 lg:px-8">
        <div class="clearfix">
            <div class="w-1/2 md:w-full float-left pr-6 md:pb-10 md:pr-0 leading-relaxed">
                <h2 class="text-3xl font-normal leading-1.3 mb-4">What happened?</h2>
                <p>The web server reported a gateway time-out error.</p>
            </div>
          
            <div class="w-1/2 md:w-full float-left leading-relaxed">
                <h2 class="text-3xl font-normal leading-1.3 mb-4">What can I do?</h2>
                <p class="mb-6">Please try again in a few minutes.</p>
            </div>
        </div>
          
    </div>

    <div class="cf-error-footer cf-wrapper w-240 lg:w-full py-10 sm:py-4 sm:px-8 mx-auto text-center sm:text-left border-solid border-0 border-t border-gray-300">

Cloudflare Ray ID: 5df10172fb86ffb8 Performance & security by Cloudflare

</div>

Add SOURCE.md

Need to add SOURCE.md so users can tell that this installer.php script is generated by another software.

This is because I consider odd the low interest in that repo.

Document with screens

Need to showcase all the screens so users can know upfront about what they will get.

404 due to 3.20.X/4.0 single-entrypoint restriction

In V3.20.13 a restriction was added to enable the application only at index.php. This restriction is causing issues after the software gets extracted as the .htaccess file won't allow direct access to installer.php.

Purposed workaround:

  • After extraction step
    • Backup the application front controller index.php as index.chevereto.php
    • Rename installer.php as index.php to be used as temp front controller
    • Issue the installer calls to index.php
  • On self-destruct
    • Remove the temp index.php file
    • Rename index.chevereto.php as index.php to restore the app controller

"Error performing HTTP request"

Hello. I am not a strong in Linux admin so apologies in advance if I haven't provided enough information. I am attempting to install Chevereto on an Ubuntu Server 20.04 LTS.

  • Apache: 10.0.11.10
  • PHP: 7.4.3
  • MariaDB 10.4

I confirmed that Apache and PHP were working and created a database. I am able to bring up the Installer page for the free edition and to run it. The installer fails, but reports the following.

Server 10.0.11.10 PHP 7.4.3
Software has been set to: chevereto-free
Database cheveretodb OK
Detecting existing cPanel .htaccess handlers
No .htaccess found
Downloading latest chevereto-free release
Downloaded chevereto-pkg-a4f202c7.zip (4.7 MB @3.63MB/s.)
Extracting chevereto-pkg-a4f202c7.zip
Extraction completeted (424 files in 0.23s)
Creating app/settings.php file
Settings file OK
Performing system setup
Error performing HTTP request
Process aborted

Is there some port or permission I may have missed that I need to enable on the server in order for the installer to continue?

No Install Folder After Install

I ran installer.php without issue via HTTP API and am presented with the following:

+===================================+
| Chevereto installation            |
+===================================+
| URL: http://192.155.90.58/
| Software: chevereto
| --
| # Database
| Host: localhost
| Port: 3306
| Name: $DATABASE_NAME
| User: $USER
| User password: $PASSWORD
+===================================+

But then when I go to the URL I am greeted with:

Not Found
The requested URL was not found on this server.

Apache/2.4.38 (Debian) Server at $IPADDRESS Port 80

The URL redirects me to $IPADDRESS/install.

Checking the public_html folder, I don't see an install folder there.

/var/www/$DOMAIN/public_html$ ls -l
total 172
drwxr-xr-x 10 www-data www-data   4096 Aug 22 03:29 app
-rw-r--r--  1 www-data www-data   1027 Aug 22 03:29 cli.php
-rw-r--r--  1 www-data www-data   1185 Aug 22 03:29 composer.json
-rw-r--r--  1 www-data www-data 138320 Aug 22 03:29 composer.lock
drwxr-xr-x  4 www-data www-data   4096 Aug 22 03:29 content
drwxr-xr-x  2 www-data www-data   4096 Aug 22 03:29 images
drwxr-xr-x  6 www-data www-data   4096 Aug 22 03:29 importing
-rw-r--r--  1 www-data www-data    599 Aug 22 03:29 index.php
drwxr-xr-x  4 www-data www-data   4096 Aug 22 03:29 lib
drwxr-xr-x  2 www-data www-data   4096 Aug 22 03:29 sdk

Split docs

This thing is barely digestible. Need to be organized under more documents.

Also facing the problem:Error performing HTTP request

I don't know what causes my problem, could you help me fix it?

system info:
Ubuntu 18.04LTS
Apache/2.4.29 (Ubuntu)
Mysql 5.7.29
PHP v7.2.24

What I did:

git clone https://github.com/Chevereto/installer.git
mv installer image
chmod 777 image -Rf
chown www-data:www-data image -Rf

And then I visit the website

Error:
image

Log of console:
image

Is there something else I need to configure before visit the website?

If there is more info I should provide please contact me.

Thank you very much for helping me!

look

<title>502 Bad Gateway</title>

502 Bad Gateway


nginx

[Feature Request] Docker implementation for paid users.

I am a happy paid user of Chevereto, but I haven't actually been able to deploy it. That's because I run my self-hosted applications on a (fairly powerful) NAS, and so my OS is limited. However, my NAS unit (like almost every one sold by the major vendors) supports Docker. I am able to self-host my other applications all side-by-side via Docker, behind a reverse proxy. So personally, I would be thrilled with a maintained deployment of Chevereto in Docker Hub. (Note that I have had Chevereto running successfully in Docker, but it never felt stable enough for production use, and I had to manage the Dockerfile myself: there was not automated/updated build.

I humbly offer two arguments commending this feature. First, this could potentially open the market for Chevereto Paid as well, so long as you require a paid license to deploy via docker (lots of options here). Many NAS owners use them to store the entire photo collection, and none of the NAS vendors' Photo Management solutions have proved satisfying to the user communities. Furthermore, the homelab/self-hosting community is heavily invested in docker for a variety of reasons. While my primary motivation might be selfish, consider the possibility that making available a docker image could broaden your customer base significantly.

My last argument is not nearly as strong: many successful open-source software projects are either moving to Docker releases for portability and ease of installation / support, or adding Docker support to their existing deployment mechanisms. This argument boils down to, "everyone else is doing it, so should we." 😃

Review .env

Must provide:

CHEVERETO_DB_HOST=%host%
CHEVERETO_DB_NAME=%name%
CHEVERETO_DB_PASS=%pass%
CHEVERETO_DB_PORT=%port%
CHEVERETO_DB_USER=%user%
CHEVERETO_DB_TABLE_PREFIX=%tablePrefix%

Error: Unable to parse server response. The installer is expecting a JSON response, but your server thrown this:

This happened when I tried to install Chevereto.
It actually is a 404 page, but I don't know why installer would cause a 404 page for install.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head>
    <title>404 &mdash; Not Found</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta name="description" content="Sorry, page not found"/>
    <style type="text/css">
        body {font-size:14px; color:#777777; font-family:arial; text-align:center;}
        h1 {font-size:180px; color:#99A7AF; margin: 70px 0 0 0;}
        h2 {color: #DE6C5D; font-family: arial; font-size: 20px; font-weight: bold; letter-spacing: -1px; margin: -3px 0 39px;}
        p {width:320px; text-align:center; margin-left:auto;margin-right:auto; margin-top: 30px }
        div {width:320px; text-align:center; margin-left:auto;margin-right:auto;}
        a:link {color: #34536A;}
        a:visited {color: #34536A;}
        a:active {color: #34536A;}
        a:hover {color: #34536A;}
    </style>

<script type="text/javascript" nonce="5a5cb9d91a5c4277b94b315b238" src="//local.adguard.org?ts=1591531329153&amp;name=%E7%BD%91%E9%A1%B5%E9%99%90%E5%88%B6%E8%A7%A3%E9%99%A4%28%E6%94%B9%29&amp;name=AdGuard%20Popup%20Blocker&amp;name=AdGuard%20Assistant&amp;name=AdGuard%20Extra&amp;type=user-script"></script></head>

<body>
    <p><a href="http://img.lun.im/">img.lun.im</a></p>
    <h1>404</h1>
    <h2>Page Not Found</h2>
    <div>
        It seems that the page you were trying to reach does not exist anymore, or maybe it has just moved.
        You can start again from the <a href="http://img.lun.im/">home</a> or go back to <a href="javascript:%20history.go(-1)">previous page</a>.
    </div>
</body>
</html>

Branch V3 and V4

Need to branch development to support these two major versions (Chevereto).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.