contentacms / contenta_jsonapi

Contenta CMS, the decoupled Drupal
http://www.contentacms.org/
GNU General Public License v2.0
328 stars 103 forks source link

Clearer error proof, step by step install instructions #353

Closed hyperfocus1337 closed 6 months ago

hyperfocus1337 commented 5 years ago

Somehow managed to install contenta previously, but now facing same issue reported before in https://github.com/contentacms/contenta_jsonapi/issues/350 while performing a new installation.

I feel the install instructions are lacking important details and I want to find out how I got my previous installation working while this one isn't.

Therefore I'm trying to come up with clear step-by-step install instructions to resolve this issue once and for all.

This is a work in progress until I find an approach which works each time without hidden steps in between.

Steps to install contenta:

  1. Download install script php -r "readfile('https://raw.githubusercontent.com/contentacms/contenta_jsonapi_project/8.x-2.x/scripts/download.sh');" > download-contentacms.sh

  2. Give permissions to install script: chmod a+x download-contentacms.sh

  3. Install contenta to any folder name (this case folder is named contenta): ./download-contentacms.sh contenta

  4. Enter directory: cd contenta

  5. Populate your .env.local file with the following environment variables:

    SITE_NAME='Contenta CMS'
    SITE_MAIL=site@email.com
    ACCOUNT_MAIL=site@email.com
    ACCOUNT_NAME=user
    ACCOUNT_PASS=password
    MYSQL_DATABASE=databasename
    MYSQL_HOSTNAME=(ip address of your mysql installation)
    MYSQL_PORT=3306
    MYSQL_USER=user
    MYSQL_PASSWORD=password
  6. Create settings.local.php file in web/sites/default folder:

    
    <?php
    $databases['default']['default'] = [
    'database' => getenv('MYSQL_DATABASE'),
    'username' => getenv('MYSQL_USER'),
    'password' => getenv('MYSQL_PASSWORD'),
    'prefix' => '',
    'host' => getenv('MYSQL_HOSTNAME'),
    'port' => getenv('MYSQL_PORT'),
    'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
    'driver' => 'mysql',
    ];

$config_directories['sync'] = 'profiles/contrib/contenta_jsonapi/config/sync';


7. Modify `settings.php` file to include `settings.local.php`, uncomment lines at the end of the file so it looks like this:

if (file_exists($app_root . '/' . $site_path . '/settings.local.php')) { include $app_root . '/' . $site_path . '/settings.local.php'; }



8. Create `files` directory: `mkdir web/sites/default/files`

9. Make `settings.php` and `files` directory writable: `chmod 777 web/sites/default/settings.php web/sites/default/files`

10. Run your docker containers or your webserver: `docker-compose up -d`

11. Enter your development domain in hosts file: `sudo nano /etc/hosts`

12. Enter php container and install contenta: `composer run-script install:with-mysql`
e0ipso commented 5 years ago

Thanks for taking the time to do this! I'll make sure to link to this information from http://contentacms.org/#install

hyperfocus1337 commented 5 years ago

Somehow it's still impossible for me to recreate a working installation with the steps outlined above. It's generating this massive error log: https://gist.github.com/SuperNami/29b1dad829f8dee638f9be8f34f9bcce

hyperfocus1337 commented 5 years ago

While following this tutorial: https://thinktandem.io/blog/2019/01/25/lando-contenta-cms-nuxt-pt-1/

The errors disappear but I'm getting a white background (css not loading properly)

matt-e-king commented 5 years ago

@hyperfocus1337 @e0ipso I am experiencing the exact same CSS issue following that tutorial. Have you discovered a fix for this?

matt-e-king commented 5 years ago

@hyperfocus1337 @e0ipso I fixed by turning off "Aggregate CSS" and "Aggregate JS" found at the url of /admin/config/development/performance.

Of course you have to navigate to this page without JS and CSS so it is a little clunky - but ticked off those checkboxes, things seem to be working now.