Build modified streamline images

The official image from streamline does not currently work for the arm64
platform. As a temporary measure, the source code and docker build scripts
have been lifted from the official images and are used to build locally.

Some additional modifications are made to reduce overall image size, these
are documented in docker/README.md
This commit is contained in:
2024-03-10 16:17:50 -07:00
parent 2ffc3c408a
commit a424394109
13506 changed files with 1860172 additions and 6 deletions
+89
View File
@@ -0,0 +1,89 @@
<?php
namespace Streamline\Models;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Spatie\Permission\Traits\HasRoles;
use OwenIt\Auditing\Contracts\Auditable;
use Illuminate\Support\Carbon;
use Illuminate\Database\Eloquent\SoftDeletes;
//use Laravel\Passport\HasApiTokens;
class User extends Authenticatable implements Auditable {
// use HasApiTokens;
use Notifiable;
use HasRoles;
/*
* use laravel-auditing to track database changes
*/
use \OwenIt\Auditing\Auditable;
use SoftDeletes;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'first_name', 'last_name', 'username', 'phone', 'position_id', 'email', 'photo', 'council_registration', 'willing_to_donate', 'last_donation_date', 'council_id', 'registration_number', 'expiry_date', 'password',
'pin', 'blood_group_id', 'created_by', 'updated_by', 'last_seen'
];
public $timestamps = true;
protected $rememberTokenName = false;
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'password', 'remember_token'
];
protected $casts = [
'expiry_date' => 'datetime',
'last_donation_date' => 'datetime'
];
/*
* Below are some mutators
*/
public function setExpiryDateAttribute($expiry_date) {
$this->attributes['expiry_date'] = empty($expiry_date) ? NULL : Carbon::createFromFormat('d/m/Y', $expiry_date)->format('Y-m-d');
}
public function setLastDonationDateAttribute($last_donation_date) {
$this->attributes['last_donation_date'] = empty($last_donation_date) ? NULL : Carbon::createFromFormat('d/m/Y', $last_donation_date)->format('Y-m-d');
}
/*
* Accessors
*/
public function getExpiryDateAttribute($expiry_date) {
$slash_date = $expiry_date == NULL ? '' : Carbon::createFromFormat('Y-m-d', $expiry_date)->format('d/m/Y');
return $slash_date;
}
public function getLastDonationDateAttribute($last_donation_date) {
$slash_date = '';//$last_donation_date == NULL ? '' : Carbon::createFromFormat('Y-m-d', $last_donation_date)->format('d/m/Y');
return $slash_date;
}
/*
* Other methods
*/
public static function resolveId() {
return Auth::check() ? Auth::user()->getAuthIdentifier() : null;
}
public function passwordSecurity()
{
return $this->hasOne('Streamline\Models\PasswordSecurity');
}
}