Compare commits
2 Commits
14f9eb1235
...
671198cf98
| Author | SHA1 | Date | |
|---|---|---|---|
| 671198cf98 | |||
| cf37c2ad12 |
@@ -95,3 +95,35 @@ jobs:
|
|||||||
"prerelease": ${GITHUB_REF_NAME##*-rc*:+false}${GITHUB_REF_NAME##*-rc*:-true}
|
"prerelease": ${GITHUB_REF_NAME##*-rc*:+false}${GITHUB_REF_NAME##*-rc*:-true}
|
||||||
}
|
}
|
||||||
JSON
|
JSON
|
||||||
|
|
||||||
|
deploy-api:
|
||||||
|
name: Deploy API (Production)
|
||||||
|
needs: build-and-publish-image
|
||||||
|
runs-on: [self-hosted, linux, x64, docker] # your Synology runner
|
||||||
|
environment: production # optional: add env protection rules in Gitea
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Docker login (pull private image)
|
||||||
|
run: |
|
||||||
|
echo "${{ secrets.REGISTRY_PASSWORD }}" \
|
||||||
|
| docker login "${{ secrets.REGISTRY_HOST }}" \
|
||||||
|
-u "${{ secrets.REGISTRY_USER }}" \
|
||||||
|
--password-stdin
|
||||||
|
|
||||||
|
- name: Render env file for compose
|
||||||
|
run: |
|
||||||
|
mkdir -p deploy
|
||||||
|
cat > deploy/.env <<EOF
|
||||||
|
REGISTRY=${{ secrets.REGISTRY_HOST }}
|
||||||
|
IMAGE_NS=${{ github.repository }}
|
||||||
|
TAG=${GITHUB_REF_NAME}
|
||||||
|
DB_CONN=${{ secrets.DB_CONNECTION_STRING }}
|
||||||
|
ALLOWED_ORIGINS=${{ secrets.ALLOWED_ORIGINS }}
|
||||||
|
TZ=America/Detroit
|
||||||
|
EOF
|
||||||
|
|
||||||
|
- name: Deploy (pull & up -d)
|
||||||
|
run: |
|
||||||
|
docker compose -f deploy/docker-compose.api.yml --env-file deploy/.env pull
|
||||||
|
docker compose -f deploy/docker-compose.api.yml --env-file deploy/.env up -d
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
@using JSMR.Application.VoiceWorks.Queries.Search
|
@using JSMR.Application.VoiceWorks.Queries.Search
|
||||||
@using JSMR.Domain.Enums
|
@using JSMR.Domain.Enums
|
||||||
@using JSMR.UI.Blazor.Enums
|
@using JSMR.UI.Blazor.Enums
|
||||||
|
@using JSMR.UI.Blazor.Filters
|
||||||
@using JSMR.UI.Blazor.Services
|
@using JSMR.UI.Blazor.Services
|
||||||
@using System.Globalization
|
@using System.Globalization
|
||||||
|
@using Microsoft.AspNetCore.WebUtilities
|
||||||
|
|
||||||
<div class=@GetCardClasses(Product)>
|
<div class=@GetCardClasses(Product)>
|
||||||
<div class="j-voice-work-image-container">
|
<div class="j-voice-work-image-container">
|
||||||
@@ -33,7 +35,8 @@
|
|||||||
<div class="j-tags">
|
<div class="j-tags">
|
||||||
@foreach (var tag in Product.Tags)
|
@foreach (var tag in Product.Tags)
|
||||||
{
|
{
|
||||||
<div class="j-tag">@tag.Name</div>
|
@* <div class="j-tag">@tag.Name</div> *@
|
||||||
|
<ProductTag Tag="tag"></ProductTag>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -73,20 +76,6 @@
|
|||||||
<ProductIndicator Graphic="Graphic.Headphones" Color="ColorVarient.Blue" BackgroundColor="ColorVarient.Black"></ProductIndicator>
|
<ProductIndicator Graphic="Graphic.Headphones" Color="ColorVarient.Blue" BackgroundColor="ColorVarient.Black"></ProductIndicator>
|
||||||
}
|
}
|
||||||
</BitStack>
|
</BitStack>
|
||||||
@* <div class="j-product-indicators">
|
|
||||||
@if (Product.IsValid != true)
|
|
||||||
{
|
|
||||||
<ProductIndicator Graphic="Graphic.Warning" IconVarient="IconVarient.Fill" Color="ColorVarient.Orange" BackgroundColor="ColorVarient.Black"></ProductIndicator>
|
|
||||||
}
|
|
||||||
@if (Product.Favorite)
|
|
||||||
{
|
|
||||||
<ProductIndicator Graphic="Graphic.Star" Color="ColorVarient.Pink" BackgroundColor="ColorVarient.Black"></ProductIndicator>
|
|
||||||
}
|
|
||||||
@if (Product.HasTrial || Product.HasChobit)
|
|
||||||
{
|
|
||||||
<ProductIndicator Graphic="Graphic.Headphones" Color="ColorVarient.Blue" BackgroundColor="ColorVarient.Black"></ProductIndicator>
|
|
||||||
}
|
|
||||||
</div> *@
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
28
JSMR.UI.Blazor/Components/ProductTag.razor
Normal file
28
JSMR.UI.Blazor/Components/ProductTag.razor
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
@using JSMR.Application.VoiceWorks.Queries.Search
|
||||||
|
@using JSMR.UI.Blazor.Filters
|
||||||
|
@using Microsoft.AspNetCore.WebUtilities
|
||||||
|
|
||||||
|
<a class="j-tag" @onclick="@OnClick">@Tag.Name</a>
|
||||||
|
@* <MudChip T="string" Icon="@Icons.Material.Outlined.Tag" @onclick="@OnClick" Variant="@MudBlazor.Variant.Filled" Color="@MudBlazor.Color.Surface">@Tag.Name</MudChip> *@
|
||||||
|
|
||||||
|
@code {
|
||||||
|
[Inject]
|
||||||
|
protected NavigationManager NavigationManager { get; set; } = default!;
|
||||||
|
|
||||||
|
[Parameter]
|
||||||
|
public required VoiceWorkTagItem Tag { get; set; }
|
||||||
|
|
||||||
|
private void OnClick()
|
||||||
|
{
|
||||||
|
VoiceWorkFilterState state = new()
|
||||||
|
{
|
||||||
|
TagIds = [Tag.TagId]
|
||||||
|
};
|
||||||
|
|
||||||
|
//string basePath = new Uri(NavigationManager.Uri).GetLeftPart(UriPartial.Path);
|
||||||
|
string basePath = new Uri(NavigationManager.Uri).GetLeftPart(UriPartial.Authority);
|
||||||
|
string uri = QueryHelpers.AddQueryString($"{basePath}/voiceworks", state.ToQuery());
|
||||||
|
|
||||||
|
NavigationManager.NavigateTo(uri);
|
||||||
|
}
|
||||||
|
}
|
||||||
18
deploy/docker-compose.api.yml
Normal file
18
deploy/docker-compose.api.yml
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
services:
|
||||||
|
api:
|
||||||
|
image: ${REGISTRY}/${IMAGE_NS}:${TAG}
|
||||||
|
container_name: jsmr-api
|
||||||
|
restart: unless-stopped
|
||||||
|
environment:
|
||||||
|
ASPNETCORE_URLS: http://+:8080
|
||||||
|
ASPNETCORE_ENVIRONMENT: Production
|
||||||
|
ConnectionStrings__Default: ${DB_CONN}
|
||||||
|
CORS__AllowedOrigins: ${ALLOWED_ORIGINS}
|
||||||
|
TZ: ${TZ:-America/Detroit}
|
||||||
|
ports:
|
||||||
|
- "8080:8080" # or remove and put behind your Synology reverse-proxy
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "wget", "-qO-", "http://localhost:8080/health"]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 3s
|
||||||
|
retries: 12
|
||||||
Reference in New Issue
Block a user