Compare commits

...
3 Commits
Author SHA1 Message Date
Twyco 18d19fa473 create admin user fix
CI/CD / test_and_check_app (push) Successful in 1m9s
CI/CD / Publish immutable image (push) Successful in 1m12s
2026-08-23 14:49:26 +02:00
Twyco 7331c122b5 Update Dockerfile
CI/CD / test_and_check_app (push) Successful in 3m53s
CI/CD / Publish immutable image (push) Successful in 2m32s
2026-08-22 09:27:06 +00:00
Twyco a731f9ea10 fix Kubernetes runtime deployment
CI/CD / test_and_check_app (push) Failing after 2m0s
CI/CD / Publish immutable image (push) Skipped
2026-08-22 09:40:44 +02:00
5 changed files with 36 additions and 17 deletions
+1 -1
View File
@@ -77,7 +77,7 @@ jobs:
echo "image=${image}" echo "image=${image}"
echo "tag=${tag}" echo "tag=${tag}"
echo "environment=${environment}" echo "environment=${environment}"
} >> "${GITEA_OUTPUT}" } >> "${GITHUB_OUTPUT}"
- name: Log in to private registry - name: Log in to private registry
shell: bash shell: bash
+6 -4
View File
@@ -1,6 +1,6 @@
ARG COMPOSER_IMAGE=composer:2.9.5 ARG COMPOSER_IMAGE=composer:2.9.5@sha256:698d3801b2a622ace460c4743c781282fcbcb733a4cbf8b31c44731e846585e8
ARG NODE_IMAGE=node:22-bookworm-slim ARG NODE_IMAGE=node:22-bookworm-slim@sha256:d649c27dae7ba0137b3cef5dd75baa422c08dc3d9e3fc0c23dfb172dc3cc6436
ARG PHP_IMAGE=php:8.4-fpm-bookworm ARG PHP_IMAGE=php:8.4-fpm-bookworm@sha256:c5fb7a0c02f4efe280691910c8b734995fa83598cdcf3115ef5dcb2e4617681c
FROM ${COMPOSER_IMAGE} AS composer_binary FROM ${COMPOSER_IMAGE} AS composer_binary
FROM ${NODE_IMAGE} AS node_binary FROM ${NODE_IMAGE} AS node_binary
@@ -62,7 +62,7 @@ FROM build AS test
RUN touch .env \ RUN touch .env \
&& composer audit --locked --no-interaction \ && composer audit --locked --no-interaction \
&& composer ci:check && COMPOSER_ALLOW_SUPERUSER=1 composer ci:check
FROM build AS production_builder 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 \ > /usr/local/etc/php-fpm.d/zz-kanbangit.conf \
&& mkdir -p \ && mkdir -p \
/var/www/bootstrap/cache \ /var/www/bootstrap/cache \
/var/www/storage/app/public \
/var/www/storage/framework/cache \ /var/www/storage/framework/cache \
/var/www/storage/framework/sessions \ /var/www/storage/framework/sessions \
/var/www/storage/framework/testing \ /var/www/storage/framework/testing \
/var/www/storage/framework/views \ /var/www/storage/framework/views \
/var/www/storage/logs \ /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 && chown -R www-data:www-data /var/www/bootstrap/cache /var/www/storage
USER www-data USER www-data
+11
View File
@@ -8,6 +8,7 @@ use App\Models\User;
use Illuminate\Console\Attributes\Description; use Illuminate\Console\Attributes\Description;
use Illuminate\Console\Attributes\Signature; use Illuminate\Console\Attributes\Signature;
use Illuminate\Console\Command; use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\Hash;
#[Signature('app:create-admin-user {name=Admin} {email=admin@kanbangit.test} {password=test}')] #[Signature('app:create-admin-user {name=Admin} {email=admin@kanbangit.test} {password=test}')]
@@ -25,6 +26,9 @@ class CreateAdminUser extends Command
*/ */
public function handle(): int public function handle(): int
{ {
DB::beginTransaction();
try {
$user = User::create([ $user = User::create([
'name' => $this->argument('name'), 'name' => $this->argument('name'),
'email' => $this->argument('email'), 'email' => $this->argument('email'),
@@ -38,7 +42,14 @@ class CreateAdminUser extends Command
]); ]);
$this->info(sprintf('Admin User created with emil=\'%s\' and password=\'%s\'', $this->argument('email'), $this->argument('password'))); $this->info(sprintf('Admin User created with emil=\'%s\' and password=\'%s\'', $this->argument('email'), $this->argument('password')));
DB::commit();
return self::SUCCESS; return self::SUCCESS;
} catch (\Exception $exception) {
$this->error('Admin User could not be created: ', $exception->getMessage());
DB::rollBack();
return self::FAILURE;
}
} }
} }
+2
View File
@@ -17,6 +17,8 @@ return Application::configure(basePath: dirname(__DIR__))
health: '/up', health: '/up',
) )
->withMiddleware(function (Middleware $middleware): void { ->withMiddleware(function (Middleware $middleware): void {
$middleware->trustProxies(at: '*');
$middleware->encryptCookies(except: ['appearance', 'sidebar_state']); $middleware->encryptCookies(except: ['appearance', 'sidebar_state']);
$middleware->web(append: [ $middleware->web(append: [
+5 -1
View File
@@ -37,9 +37,13 @@ http {
} }
location = /index.php { location = /index.php {
include fastcgi_params; include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTP_PROXY ''; 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}; fastcgi_pass ${PHP_FPM_UPSTREAM};
} }