Compare commits
3 Commits
a949eae777
...
e5c4abdf28
Author | SHA1 | Date | |
---|---|---|---|
e5c4abdf28 | |||
f3b6c8cd49 | |||
7501968d04 |
@ -38,4 +38,9 @@ public static function shortDigest(string $digest): string
|
|||||||
$digest = Str::of($digest)->explode(':', 2)->last();
|
$digest = Str::of($digest)->explode(':', 2)->last();
|
||||||
return Str::of($digest)->take(12)->toString();
|
return Str::of($digest)->take(12)->toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function dockerServiceAddress(): string
|
||||||
|
{
|
||||||
|
return Str::of(config('registry.service_http'))->remove(['http://', 'https://'])->toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
use App\Dto\QuerySettingsDto;
|
use App\Dto\QuerySettingsDto;
|
||||||
use App\Dto\Service\Site\AccessTokens\StoreUpdate;
|
use App\Dto\Service\Site\AccessTokens\StoreUpdate;
|
||||||
use App\Enums\AccessTokenPermission;
|
use App\Enums\AccessTokenPermission;
|
||||||
|
use App\Helpers\Helpers;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use App\Repositories\AccessTokenRepository;
|
use App\Repositories\AccessTokenRepository;
|
||||||
use App\ServiceResults\ServiceResultArray;
|
use App\ServiceResults\ServiceResultArray;
|
||||||
@ -39,7 +40,7 @@ public function create(User $user): ServiceResultError | ServiceResultArray
|
|||||||
{
|
{
|
||||||
return $this->result([
|
return $this->result([
|
||||||
'user' => $user,
|
'user' => $user,
|
||||||
'serviceAddress' => config('registry.service_http'),
|
'serviceAddress' => Helpers::dockerServiceAddress(),
|
||||||
'permissions' => AccessTokenPermission::toCollection()->pluck('title', 'value')->toArray(),
|
'permissions' => AccessTokenPermission::toCollection()->pluck('title', 'value')->toArray(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
use App\Dto\Builder\Repository as RepositoryBuilder;
|
use App\Dto\Builder\Repository as RepositoryBuilder;
|
||||||
use App\Dto\QuerySettingsDto;
|
use App\Dto\QuerySettingsDto;
|
||||||
use App\Dto\Service\Site\Repository\StoreUpdate;
|
use App\Dto\Service\Site\Repository\StoreUpdate;
|
||||||
|
use App\Helpers\Helpers;
|
||||||
use App\Models\Repository;
|
use App\Models\Repository;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use App\Repositories\RepositoryRepository;
|
use App\Repositories\RepositoryRepository;
|
||||||
@ -65,7 +66,7 @@ public function repository(string $username, string $repositoryName, ?User $user
|
|||||||
return $this->result([
|
return $this->result([
|
||||||
'repository' => $repository,
|
'repository' => $repository,
|
||||||
'pageUser' => $pageUser,
|
'pageUser' => $pageUser,
|
||||||
'serviceAddress' => config('registry.service_http'),
|
'serviceAddress' => Helpers::dockerServiceAddress(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
namespace App\Services\Site;
|
namespace App\Services\Site;
|
||||||
|
|
||||||
use App\Dto\QuerySettingsDto;
|
use App\Dto\QuerySettingsDto;
|
||||||
|
use App\Helpers\Helpers;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use App\Repositories\RepositoryRepository;
|
use App\Repositories\RepositoryRepository;
|
||||||
use App\Repositories\TagRepositoryRepository;
|
use App\Repositories\TagRepositoryRepository;
|
||||||
@ -55,7 +56,7 @@ public function tags(string $username, string $repositoryName, QuerySettingsDto
|
|||||||
'tags' => $tags,
|
'tags' => $tags,
|
||||||
'repository' => $repository,
|
'repository' => $repository,
|
||||||
'pageUser' => $pageUser,
|
'pageUser' => $pageUser,
|
||||||
'serviceAddress' => config('registry.service_http'),
|
'serviceAddress' => Helpers::dockerServiceAddress(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,6 +12,9 @@ services:
|
|||||||
- captcha-app
|
- captcha-app
|
||||||
ports:
|
ports:
|
||||||
- ${DOCKER_APP_PORT}:9000
|
- ${DOCKER_APP_PORT}:9000
|
||||||
|
environment:
|
||||||
|
CONTAINER_ROLE: app
|
||||||
|
UNIT_SOURCE: '"172.16.0.0/12"'
|
||||||
volumes:
|
volumes:
|
||||||
- ./app/application:/var/www/html
|
- ./app/application:/var/www/html
|
||||||
- ./certs:/var/www/html/resources/certs:ro
|
- ./certs:/var/www/html/resources/certs:ro
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
version: '3.7'
|
version: '3.7'
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
image: korelf/mdhub:0.1.0-beta
|
# image: korelf/mdhub:0.1.0-beta # docker hub
|
||||||
|
image: docker.mdhub.kor-elf.net/kor-elf/mdhub:0.1.0-beta #MDHub
|
||||||
# restart: always
|
# restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
@ -10,12 +11,16 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- ${DOCKER_APP_PORT}:9000
|
- ${DOCKER_APP_PORT}:9000
|
||||||
env_file: app/.env
|
env_file: app/.env
|
||||||
|
environment:
|
||||||
|
CONTAINER_ROLE: app
|
||||||
|
UNIT_SOURCE: '"172.16.0.0/12"'
|
||||||
volumes:
|
volumes:
|
||||||
- ./app/storage/app:/var/www/html/storage/app
|
- ./app/storage/app:/var/www/html/storage/app
|
||||||
- ./app/storage/logs:/var/www/html/storage/logs
|
- ./app/storage/logs:/var/www/html/storage/logs
|
||||||
- ./certs:/var/www/html/resources/certs:ro
|
- ./certs:/var/www/html/resources/certs:ro
|
||||||
queue:
|
queue:
|
||||||
image: korelf/mdhub:0.1.0-beta
|
# image: korelf/mdhub:0.1.0-beta # docker hub
|
||||||
|
image: docker.mdhub.kor-elf.net/kor-elf/mdhub:0.1.0-beta #MDHub
|
||||||
# restart: always
|
# restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
@ -28,7 +33,8 @@ services:
|
|||||||
- ./app/storage/logs:/var/www/html/storage/logs
|
- ./app/storage/logs:/var/www/html/storage/logs
|
||||||
- ./certs:/var/www/html/resources/certs:ro
|
- ./certs:/var/www/html/resources/certs:ro
|
||||||
scheduler:
|
scheduler:
|
||||||
image: korelf/mdhub:0.1.0-beta
|
# image: korelf/mdhub:0.1.0-beta # docker hub
|
||||||
|
image: docker.mdhub.kor-elf.net/kor-elf/mdhub:0.1.0-beta #MDHub
|
||||||
# restart: always
|
# restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
|
Loading…
Reference in New Issue
Block a user