Skip to content

Commit

Permalink
2.x docker
Browse files Browse the repository at this point in the history
  • Loading branch information
saeedvaziry committed Oct 13, 2024
1 parent d7dc54e commit 37f502d
Show file tree
Hide file tree
Showing 6 changed files with 166 additions and 136 deletions.
1 change: 0 additions & 1 deletion .github/workflows/docker-2x.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ jobs:
docker buildx build . \
-f docker/Dockerfile \
-t vitodeploy/vito:2.x \
--build-arg="RELEASE=0" \
--platform linux/amd64,linux/arm64 \
--no-cache \
--push
7 changes: 6 additions & 1 deletion app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,13 @@ public static function boot(): void
parent::boot();

static::created(function (User $user) {
if (Project::count() === 0) {
if ($user->projects()->count() === 0) {
$user->createDefaultProject();
$user->refresh();
}
if (! $user->currentProject) {
$user->current_project_id = $user->projects()->first()->id;
$user->save();
}
});
}
Expand Down
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
"name": "vitodeploy/vito",
"type": "project",
"description": "The ultimate server management tool",
"keywords": ["framework", "laravel"],
"keywords": [
"framework",
"laravel"
],
"license": "AGPL-3.0",
"require": {
"php": "^8.2",
"ext-ftp": "*",
"ext-intl": "*",
"aws/aws-sdk-php": "^3.158",
"filament/filament": "^3.2",
"laravel/fortify": "^1.17",
Expand Down
Loading

0 comments on commit 37f502d

Please sign in to comment.