Compare commits
No commits in common. "469197db320cfb70447573095f76e5851361594e" and "d3518d6bb5e3a0ad40cc31ea582fe73857ca2365" have entirely different histories.
469197db32
...
d3518d6bb5
@ -3,7 +3,7 @@
|
|||||||
"isRoot": true,
|
"isRoot": true,
|
||||||
"tools": {
|
"tools": {
|
||||||
"dotnet-ef": {
|
"dotnet-ef": {
|
||||||
"version": "8.0.1",
|
"version": "7.0.2",
|
||||||
"commands": [
|
"commands": [
|
||||||
"dotnet-ef"
|
"dotnet-ef"
|
||||||
]
|
]
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
name: Release
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- "master"
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release-image:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: catthehacker/ubuntu:act-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: Login to Gitea Hub
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: gitea.cebotari.ru
|
|
||||||
username: chebser
|
|
||||||
password: ${{ secrets.DOCKER_TOKEN }}
|
|
||||||
- name: Build app
|
|
||||||
uses: docker/build-push-action@v5
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
file: ./Dockerfile
|
|
||||||
push: true
|
|
||||||
tags: gitea.cebotari.ru/chebser/mydarlig-dotnet:latest
|
|
24
Dockerfile
24
Dockerfile
@ -1,15 +1,19 @@
|
|||||||
FROM mcr.microsoft.com/dotnet/sdk:8.0-jammy AS build
|
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
||||||
WORKDIR /source
|
WORKDIR /app
|
||||||
|
|
||||||
COPY . .
|
COPY . ./
|
||||||
RUN dotnet restore && \
|
RUN dotnet restore
|
||||||
dotnet tool restore && \
|
RUN dotnet tool restore
|
||||||
dotnet libman restore
|
RUN dotnet libman restore
|
||||||
RUN dotnet publish --property:OutputPath=/app
|
RUN dotnet ef database update --context DataContext
|
||||||
|
RUN dotnet ef database update --context IdentityContext
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:8.0-jammy
|
RUN dotnet publish -c Release -o out
|
||||||
|
|
||||||
|
FROM mcr.microsoft.com/dotnet/aspnet:6.0
|
||||||
EXPOSE 5000
|
EXPOSE 5000
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=build /app .
|
COPY --from=build /app/out .
|
||||||
|
COPY --from=build /app/Database ./Database
|
||||||
ENV ASPNETCORE_ENVIRONMENT Production
|
ENV ASPNETCORE_ENVIRONMENT Production
|
||||||
ENTRYPOINT [ "./MyDarling", "--urls=http://0.0.0.0:5000" ]
|
ENTRYPOINT [ "dotnet", "MyDarling.dll", "--urls=http://0.0.0.0:5000" ]
|
@ -1,21 +1,20 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net8.0</TargetFramework>
|
<TargetFramework>net6.0</TargetFramework>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<InvariantGlobalization>false</InvariantGlobalization>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.1" />
|
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.0" />
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.1">
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.2">
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.1" />
|
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="7.0.2" />
|
||||||
<PackageReference Include="SkiaSharp" Version="2.88.7" />
|
<PackageReference Include="SkiaSharp" Version="2.88.3" />
|
||||||
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.88.7" />
|
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.88.3" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -1,42 +0,0 @@
|
|||||||
@page "/feed.yml"
|
|
||||||
@using Microsoft.AspNetCore.Http
|
|
||||||
@using Microsoft.EntityFrameworkCore
|
|
||||||
@inject MyDarling.Models.DataContext context
|
|
||||||
@{
|
|
||||||
var p =
|
|
||||||
new { Url = "https://mydarlingunderwear.ru/", LastUpdated = DateTime.Today };
|
|
||||||
Response.ContentType = "text/xml";
|
|
||||||
var products = context.Products
|
|
||||||
.Include(b => b.Figures)
|
|
||||||
.Where(b => b.Price != 0 && b.Figures.Count > 0);
|
|
||||||
await Response.WriteAsync("<?xml version='1.0' encoding='UTF-8' ?>");
|
|
||||||
var updateDate = p.LastUpdated.ToString("yyyy-MM-dd");
|
|
||||||
}
|
|
||||||
|
|
||||||
<yml_catalog date="@updateDate">
|
|
||||||
<shop>
|
|
||||||
<name>My Darling Underwear</name>
|
|
||||||
<company>Екатерина Мануйлова</company>
|
|
||||||
<url>@p.Url</url>
|
|
||||||
<currencies>
|
|
||||||
<currency id="RUB" rate="1"></currency>
|
|
||||||
</currencies>
|
|
||||||
<categories>
|
|
||||||
<category id="1">Нижнее бельё</category>
|
|
||||||
</categories>
|
|
||||||
<offers>
|
|
||||||
@foreach (var product in products)
|
|
||||||
{
|
|
||||||
var figureUrl = $"{@p.Url}Content/{@product.Id}/{@product.Figures[0].Id}.jpg";
|
|
||||||
<offer id="@product.Id" available="true">
|
|
||||||
<url>@p.Url#@product.Id-1</url>
|
|
||||||
<price>@product.Price</price>
|
|
||||||
<currencyId>RUR</currencyId>
|
|
||||||
<categoryId>1</categoryId>
|
|
||||||
<name>@product.Name</name>
|
|
||||||
<picture>@figureUrl</picture>
|
|
||||||
</offer>
|
|
||||||
}
|
|
||||||
</offers>
|
|
||||||
</shop>
|
|
||||||
</yml_catalog>
|
|
@ -24,11 +24,6 @@
|
|||||||
<link href="/lib/fancyapps-ui/fancybox.css" rel="stylesheet" />
|
<link href="/lib/fancyapps-ui/fancybox.css" rel="stylesheet" />
|
||||||
<link href="/css/styles.css" rel="stylesheet" />
|
<link href="/css/styles.css" rel="stylesheet" />
|
||||||
|
|
||||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
||||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
||||||
<link
|
|
||||||
href="https://fonts.googleapis.com/css2?family=Noto+Sans&family=Noto+Sans+Mono&family=Nunito&display=swap"
|
|
||||||
rel="stylesheet">
|
|
||||||
<!-- Yandex.Metrika counter -->
|
<!-- Yandex.Metrika counter -->
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
(function (m, e, t, r, i, k, a) {
|
(function (m, e, t, r, i, k, a) {
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
version: '3'
|
version: '3'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
my-darling-test:
|
my-darling:
|
||||||
build: .
|
image: gitea.cebotari.ru/chebser/mydarling-dotnet:latest
|
||||||
container_name: mydarling-dotnet
|
container_name: mydarling-dotnet
|
||||||
ports:
|
ports:
|
||||||
- "5000:5000"
|
- "5050:5000"
|
||||||
volumes:
|
volumes:
|
||||||
- ./Database:/app/Database
|
- db:/app/Database
|
||||||
- ./wwwroot/Content:/app/wwwroot/Content
|
- content:/app/wwwroot/Content
|
||||||
environment:
|
environment:
|
||||||
- ADMIN_PASSWORD=He110World!
|
- ADMIN_PASSWORD=He110World!
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
db:
|
||||||
|
content:
|
@ -58,10 +58,10 @@
|
|||||||
--bs-black-rgb: 0, 0, 0;
|
--bs-black-rgb: 0, 0, 0;
|
||||||
--bs-body-color-rgb: 33, 37, 41;
|
--bs-body-color-rgb: 33, 37, 41;
|
||||||
--bs-body-bg-rgb: 255, 255, 255;
|
--bs-body-bg-rgb: 255, 255, 255;
|
||||||
--bs-font-sans-serif: 'Noto Sans', sans-serif;
|
--bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||||
--bs-font-monospace: 'Noto Sans Mono', monospace;
|
--bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||||
--bs-body-font-family: 'Nunito', sans-serif;
|
|
||||||
--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
|
--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
|
||||||
|
--bs-body-font-family: Nunito, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
|
||||||
--bs-body-font-size: 1rem;
|
--bs-body-font-size: 1rem;
|
||||||
--bs-body-font-weight: 400;
|
--bs-body-font-weight: 400;
|
||||||
--bs-body-line-height: 1.5;
|
--bs-body-line-height: 1.5;
|
||||||
@ -380,7 +380,9 @@ select:disabled {
|
|||||||
button,
|
button,
|
||||||
[type=button],
|
[type=button],
|
||||||
[type=reset],
|
[type=reset],
|
||||||
[type=submit]
|
[type=submit] {
|
||||||
|
-webkit-appearance: button;
|
||||||
|
}
|
||||||
button:not(:disabled),
|
button:not(:disabled),
|
||||||
[type=button]:not(:disabled),
|
[type=button]:not(:disabled),
|
||||||
[type=reset]:not(:disabled),
|
[type=reset]:not(:disabled),
|
||||||
@ -437,6 +439,7 @@ legend + * {
|
|||||||
|
|
||||||
[type=search] {
|
[type=search] {
|
||||||
outline-offset: -2px;
|
outline-offset: -2px;
|
||||||
|
-webkit-appearance: textfield;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* rtl:raw:
|
/* rtl:raw:
|
||||||
@ -2489,7 +2492,8 @@ textarea.form-control-lg {
|
|||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
-moz-appearance: none;
|
-moz-appearance: none;
|
||||||
appearance: none;
|
appearance: none;
|
||||||
-print-color-adjust: exact;
|
-webkit-print-color-adjust: exact;
|
||||||
|
color-adjust: exact;
|
||||||
}
|
}
|
||||||
.form-check-input[type=checkbox] {
|
.form-check-input[type=checkbox] {
|
||||||
border-radius: 0.25em;
|
border-radius: 0.25em;
|
||||||
@ -4655,7 +4659,6 @@ textarea.form-control-lg {
|
|||||||
.card-body {
|
.card-body {
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
padding: 1rem 1rem;
|
padding: 1rem 1rem;
|
||||||
box-shadow: 0 4px 5px rgba(0,0,0,0.2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-title {
|
.card-title {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user