contentacms/contenta_jsonapi

Clearer error proof, step by step install instructions

Closed this issue · 5 comments

Somehow managed to install contenta previously, but now facing same issue reported before in #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
  1. 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';
  1. 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';
}
  1. Create files directory: mkdir web/sites/default/files

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

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

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

  5. Enter php container and install contenta: composer run-script install:with-mysql

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

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

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)

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

@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.