Compare commits
3
Commits
afe99ea6d4
...
v0.1.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
18d19fa473 | ||
|
|
7331c122b5 | ||
|
|
a731f9ea10 |
@@ -77,7 +77,7 @@ jobs:
|
||||
echo "image=${image}"
|
||||
echo "tag=${tag}"
|
||||
echo "environment=${environment}"
|
||||
} >> "${GITEA_OUTPUT}"
|
||||
} >> "${GITHUB_OUTPUT}"
|
||||
|
||||
- name: Log in to private registry
|
||||
shell: bash
|
||||
|
||||
+6
-4
@@ -1,6 +1,6 @@
|
||||
ARG COMPOSER_IMAGE=composer:2.9.5
|
||||
ARG NODE_IMAGE=node:22-bookworm-slim
|
||||
ARG PHP_IMAGE=php:8.4-fpm-bookworm
|
||||
ARG COMPOSER_IMAGE=composer:2.9.5@sha256:698d3801b2a622ace460c4743c781282fcbcb733a4cbf8b31c44731e846585e8
|
||||
ARG NODE_IMAGE=node:22-bookworm-slim@sha256:d649c27dae7ba0137b3cef5dd75baa422c08dc3d9e3fc0c23dfb172dc3cc6436
|
||||
ARG PHP_IMAGE=php:8.4-fpm-bookworm@sha256:c5fb7a0c02f4efe280691910c8b734995fa83598cdcf3115ef5dcb2e4617681c
|
||||
|
||||
FROM ${COMPOSER_IMAGE} AS composer_binary
|
||||
FROM ${NODE_IMAGE} AS node_binary
|
||||
@@ -62,7 +62,7 @@ FROM build AS test
|
||||
|
||||
RUN touch .env \
|
||||
&& composer audit --locked --no-interaction \
|
||||
&& composer ci:check
|
||||
&& COMPOSER_ALLOW_SUPERUSER=1 composer ci:check
|
||||
|
||||
FROM build AS production_builder
|
||||
|
||||
@@ -92,11 +92,13 @@ RUN chmod +x /usr/local/bin/kanbangit-entrypoint /usr/local/bin/php-fpm-healthch
|
||||
> /usr/local/etc/php-fpm.d/zz-kanbangit.conf \
|
||||
&& mkdir -p \
|
||||
/var/www/bootstrap/cache \
|
||||
/var/www/storage/app/public \
|
||||
/var/www/storage/framework/cache \
|
||||
/var/www/storage/framework/sessions \
|
||||
/var/www/storage/framework/testing \
|
||||
/var/www/storage/framework/views \
|
||||
/var/www/storage/logs \
|
||||
&& ln -s ../storage/app/public /var/www/public/storage \
|
||||
&& chown -R www-data:www-data /var/www/bootstrap/cache /var/www/storage
|
||||
|
||||
USER www-data
|
||||
|
||||
@@ -8,6 +8,7 @@ use App\Models\User;
|
||||
use Illuminate\Console\Attributes\Description;
|
||||
use Illuminate\Console\Attributes\Signature;
|
||||
use Illuminate\Console\Command;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
|
||||
#[Signature('app:create-admin-user {name=Admin} {email=admin@kanbangit.test} {password=test}')]
|
||||
@@ -25,20 +26,30 @@ class CreateAdminUser extends Command
|
||||
*/
|
||||
public function handle(): int
|
||||
{
|
||||
$user = User::create([
|
||||
'name' => $this->argument('name'),
|
||||
'email' => $this->argument('email'),
|
||||
'password' => Hash::make($this->argument('password')),
|
||||
]);
|
||||
DB::beginTransaction();
|
||||
|
||||
$this->avatars->generate($user);
|
||||
try {
|
||||
$user = User::create([
|
||||
'name' => $this->argument('name'),
|
||||
'email' => $this->argument('email'),
|
||||
'password' => Hash::make($this->argument('password')),
|
||||
]);
|
||||
|
||||
$user->permissionAssignments()->create([
|
||||
'permission' => Permission::GlobalAdmin,
|
||||
]);
|
||||
$this->avatars->generate($user);
|
||||
|
||||
$this->info(sprintf('Admin User created with emil=\'%s\' and password=\'%s\'', $this->argument('email'), $this->argument('password')));
|
||||
$user->permissionAssignments()->create([
|
||||
'permission' => Permission::GlobalAdmin,
|
||||
]);
|
||||
|
||||
return self::SUCCESS;
|
||||
$this->info(sprintf('Admin User created with emil=\'%s\' and password=\'%s\'', $this->argument('email'), $this->argument('password')));
|
||||
DB::commit();
|
||||
|
||||
return self::SUCCESS;
|
||||
} catch (\Exception $exception) {
|
||||
$this->error('Admin User could not be created: ', $exception->getMessage());
|
||||
DB::rollBack();
|
||||
|
||||
return self::FAILURE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,8 @@ return Application::configure(basePath: dirname(__DIR__))
|
||||
health: '/up',
|
||||
)
|
||||
->withMiddleware(function (Middleware $middleware): void {
|
||||
$middleware->trustProxies(at: '*');
|
||||
|
||||
$middleware->encryptCookies(except: ['appearance', 'sidebar_state']);
|
||||
|
||||
$middleware->web(append: [
|
||||
|
||||
@@ -37,9 +37,13 @@ http {
|
||||
}
|
||||
|
||||
location = /index.php {
|
||||
include fastcgi_params;
|
||||
include /etc/nginx/fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param HTTP_PROXY '';
|
||||
fastcgi_param HTTP_X_FORWARDED_FOR $http_x_forwarded_for;
|
||||
fastcgi_param HTTP_X_FORWARDED_HOST $http_x_forwarded_host;
|
||||
fastcgi_param HTTP_X_FORWARDED_PORT $http_x_forwarded_port;
|
||||
fastcgi_param HTTP_X_FORWARDED_PROTO $http_x_forwarded_proto;
|
||||
fastcgi_pass ${PHP_FPM_UPSTREAM};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user