Open leobuskin opened 6 years ago
I found check for setup redirection:
public function handle(Request $request, Closure $next)
{
if (!$this->settings->get('app_name')) {
return cachet_redirect('setup');
}
return $next($request);
}
But app_name was set up in database (I can see it in PG table chq_settings) and as environment variable too but Cachet still redirects
In v2.3, I can avoid the initial setup process by putting development.php
into an application bootstrap directory.
docker cp development.php $(docker-compose ps -q cachet):/var/www/html/bootstrap/cachet/development.php
development.php
contains
<?php return array (
'app_name' => 'Cachet Test',
'app_domain' => 'http://localhost:8000',
'app_timezone' => 'Asia/Tokyo',
'app_locale' => 'ja',
'app_incident_days' => '7',
'header' => '<div class="container"><h1>Cachet Test</h1></div>',
'app_about' => '',
'enable_subscribers' => '0',
'skip_subscriber_verification' => '0',
'display_graphs' => '0',
'show_support' => '0',
'enable_external_dependencies' => '1',
'show_timezone' => '1',
);
The file name should be production.php
if APP_ENV
was production
(I think. Not yet tried on my side.)
Regarding v2.4, it's worth checking the bootstrap codes after the initial setup process (by docker cp
or docker exec
).
So I dump the SQL and import it for now most of it works.
I'm trying to understand how to make automatic setup with docker distribution of Cachet and it looks nearly impossible now.
I'm setting mostly all environment variables, adding settings and user to database with standalone python script (starts after database and Cachet and updates tables), but Cachet always starts (redirects) with Setup page.