mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-01 14:06:15 +00:00
fix importer
fix plugins on docker
This commit is contained in:
@ -109,7 +109,9 @@ public function import(Request $request): RedirectResponse
|
|||||||
|
|
||||||
// Replace files
|
// Replace files
|
||||||
File::move($extractPath.'/database.sqlite', storage_path('database.sqlite'));
|
File::move($extractPath.'/database.sqlite', storage_path('database.sqlite'));
|
||||||
File::copy($extractPath.'/.env', base_path('.env'));
|
if (File::exists($extractPath.'/.env')) {
|
||||||
|
File::move($extractPath.'/.env', base_path('.env'));
|
||||||
|
}
|
||||||
File::move($extractPath.'/ssh-public.key', storage_path('ssh-public.key'));
|
File::move($extractPath.'/ssh-public.key', storage_path('ssh-public.key'));
|
||||||
File::move($extractPath.'/ssh-private.pem', storage_path('ssh-private.pem'));
|
File::move($extractPath.'/ssh-private.pem', storage_path('ssh-private.pem'));
|
||||||
File::moveDirectory($extractPath.'/key-pairs', storage_path('app/key-pairs'));
|
File::moveDirectory($extractPath.'/key-pairs', storage_path('app/key-pairs'));
|
||||||
|
@ -54,7 +54,7 @@ public function install(string $url, ?string $branch = null, ?string $tag = null
|
|||||||
$command .= " --tag $tag";
|
$command .= " --tag $tag";
|
||||||
}
|
}
|
||||||
$command .= ' --single-branch';
|
$command .= ' --single-branch';
|
||||||
$result = Process::timeout(0)->run($command);
|
$result = Process::env(['PATH' => dirname(git_path())])->timeout(0)->run($command);
|
||||||
$output = $result->output();
|
$output = $result->output();
|
||||||
|
|
||||||
if ($result->failed()) {
|
if ($result->failed()) {
|
||||||
|
@ -265,3 +265,15 @@ function php_path(): ?string
|
|||||||
|
|
||||||
return array_find($paths, fn ($path) => is_executable($path));
|
return array_find($paths, fn ($path) => is_executable($path));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function git_path(): ?string
|
||||||
|
{
|
||||||
|
$paths = [
|
||||||
|
'/usr/local/bin/git',
|
||||||
|
'/usr/bin/git',
|
||||||
|
'/opt/homebrew/bin/git',
|
||||||
|
trim((string) shell_exec('which git')),
|
||||||
|
];
|
||||||
|
|
||||||
|
return array_find($paths, fn ($path) => is_executable($path));
|
||||||
|
}
|
||||||
|
@ -87,7 +87,6 @@
|
|||||||
|
|
||||||
'middleware' => [
|
'middleware' => [
|
||||||
'web',
|
'web',
|
||||||
\Opcodes\LogViewer\Http\Middleware\AuthorizeLogViewer::class,
|
|
||||||
'auth',
|
'auth',
|
||||||
\App\Http\Middleware\MustBeAdminMiddleware::class,
|
\App\Http\Middleware\MustBeAdminMiddleware::class,
|
||||||
],
|
],
|
||||||
@ -103,7 +102,8 @@
|
|||||||
|
|
||||||
'api_middleware' => [
|
'api_middleware' => [
|
||||||
\Opcodes\LogViewer\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
|
\Opcodes\LogViewer\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
|
||||||
\Opcodes\LogViewer\Http\Middleware\AuthorizeLogViewer::class,
|
'auth',
|
||||||
|
\App\Http\Middleware\MustBeAdminMiddleware::class,
|
||||||
],
|
],
|
||||||
|
|
||||||
'api_stateful_domains' => env('LOG_VIEWER_API_STATEFUL_DOMAINS') ? explode(',', env('LOG_VIEWER_API_STATEFUL_DOMAINS')) : null,
|
'api_stateful_domains' => env('LOG_VIEWER_API_STATEFUL_DOMAINS') ? explode(',', env('LOG_VIEWER_API_STATEFUL_DOMAINS')) : null,
|
||||||
|
@ -8,7 +8,7 @@ ENV DEBIAN_FRONTEND=noninteractive
|
|||||||
RUN apt-get update && apt-get upgrade -y && apt-get autoremove -y
|
RUN apt-get update && apt-get upgrade -y && apt-get autoremove -y
|
||||||
|
|
||||||
# requirements
|
# requirements
|
||||||
RUN apt-get install -y software-properties-common curl zip unzip gcc nginx \
|
RUN apt-get install -y software-properties-common curl zip unzip gcc nginx git \
|
||||||
cron gnupg gosu curl ca-certificates zip unzip supervisor libcap2-bin libpng-dev \
|
cron gnupg gosu curl ca-certificates zip unzip supervisor libcap2-bin libpng-dev \
|
||||||
dnsutils librsvg2-bin fswatch wget openssh-client \
|
dnsutils librsvg2-bin fswatch wget openssh-client \
|
||||||
&& add-apt-repository ppa:ondrej/php -y \
|
&& add-apt-repository ppa:ondrej/php -y \
|
||||||
|
@ -7,6 +7,8 @@ server {
|
|||||||
add_header X-Frame-Options "SAMEORIGIN";
|
add_header X-Frame-Options "SAMEORIGIN";
|
||||||
add_header X-Content-Type-Options "nosniff";
|
add_header X-Content-Type-Options "nosniff";
|
||||||
|
|
||||||
|
client_max_body_size 100M;
|
||||||
|
|
||||||
index index.php;
|
index index.php;
|
||||||
|
|
||||||
charset utf-8;
|
charset utf-8;
|
||||||
|
Reference in New Issue
Block a user