mirror of
https://github.com/yummy4friends/y4f.git
synced 2024-12-30 21:17:09 +01:00
Compare commits
No commits in common. "6c1b7bd3369274ca03c047b36be045bd9de78ab8" and "94f6f099bb24d95636ef3fee83d5b1a0763a21d6" have entirely different histories.
6c1b7bd336
...
94f6f099bb
29
.github/workflows/main.yml
vendored
Normal file
29
.github/workflows/main.yml
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
name: Deploy blazor to GitHub Pages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "dev" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v3
|
||||
with:
|
||||
dotnet-version: 7.0
|
||||
- name: Publish
|
||||
run: dotnet publish --configuration Release -o release --nologo --runtime linux-x64 --self-contained src/y4f/y4f.csproj
|
||||
- name: Commit wwwroot to GitHub Pages
|
||||
uses: JamesIves/github-pages-deploy-action@v4
|
||||
with:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
BRANCH: gh-pages
|
||||
FOLDER: release/wwwroot
|
||||
- name: Change base-tag in index.html from / to y4f
|
||||
run: sed -i 's/<base href="\/" \/>/<base href="\/y4f\/" \/>/g' release/wwwroot/index.html
|
||||
- name: Add .nojekyll file
|
||||
run: touch release/wwwroot/.nojekyll
|
@ -1,6 +0,0 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:7.0
|
||||
WORKDIR /App
|
||||
COPY . ./
|
||||
RUN dotnet restore
|
||||
EXPOSE 5248
|
||||
CMD /usr/bin/dotnet run --project /App/src/y4f/y4f.csproj
|
@ -1,22 +0,0 @@
|
||||
version: "3.4"
|
||||
services:
|
||||
y4f:
|
||||
build: .
|
||||
ports:
|
||||
- "5248:5248"
|
||||
labels:
|
||||
- traefik.docker.network=traefik
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.y4f.entrypoints=web-secure
|
||||
- traefik.http.routers.y4f.rule=Host(`y4f.hopeless-cloud.xyz`)
|
||||
- traefik.http.routers.y4f.tls=true
|
||||
- traefik.http.routers.y4f.tls.certResolver=default
|
||||
networks:
|
||||
- default
|
||||
- traefik
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
default:
|
||||
name: y4f-default
|
||||
traefik:
|
||||
external: true
|
@ -1,124 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using WebApi.Data;
|
||||
using WebApi.Models;
|
||||
|
||||
namespace WebApi.Controllers
|
||||
{
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class AdminsController : ControllerBase
|
||||
{
|
||||
private readonly WebApiContext _context;
|
||||
|
||||
public AdminsController(WebApiContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
|
||||
// GET: api/Admins
|
||||
[HttpGet]
|
||||
public async Task<ActionResult<IEnumerable<Admin>>> GetAdmins()
|
||||
{
|
||||
if (_context.Admins == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
return await _context.Admins.ToListAsync();
|
||||
}
|
||||
|
||||
// GET: api/Admins/5
|
||||
[HttpGet("{id}")]
|
||||
public async Task<ActionResult<Admin>> GetAdmin(int id)
|
||||
{
|
||||
if (_context.Admins == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
var admin = await _context.Admins.FindAsync(id);
|
||||
|
||||
if (admin == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return admin;
|
||||
}
|
||||
|
||||
// PUT: api/Admins/5
|
||||
// To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754
|
||||
[HttpPut("{id}")]
|
||||
public async Task<IActionResult> PutAdmin(int id, Admin admin)
|
||||
{
|
||||
if (id != admin.Id)
|
||||
{
|
||||
return BadRequest();
|
||||
}
|
||||
|
||||
_context.Entry(admin).State = EntityState.Modified;
|
||||
|
||||
try
|
||||
{
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch (DbUpdateConcurrencyException)
|
||||
{
|
||||
if (!AdminExists(id))
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
return NoContent();
|
||||
}
|
||||
|
||||
// POST: api/Admins
|
||||
// To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754
|
||||
[HttpPost]
|
||||
public async Task<ActionResult<Admin>> PostAdmin(Admin admin)
|
||||
{
|
||||
if (_context.Admins == null)
|
||||
{
|
||||
return Problem("Entity set 'WebApiContext.Admins' is null.");
|
||||
}
|
||||
_context.Admins.Add(admin);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return CreatedAtAction("GetAdmin", new { id = admin.Id }, admin);
|
||||
}
|
||||
|
||||
// DELETE: api/Admins/5
|
||||
[HttpDelete("{id}")]
|
||||
public async Task<IActionResult> DeleteAdmin(int id)
|
||||
{
|
||||
if (_context.Admins == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
var admin = await _context.Admins.FindAsync(id);
|
||||
if (admin == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
_context.Admins.Remove(admin);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return NoContent();
|
||||
}
|
||||
|
||||
private bool AdminExists(int id)
|
||||
{
|
||||
return (_context.Admins?.Any(e => e.Id == id)).GetValueOrDefault();
|
||||
}
|
||||
}
|
||||
}
|
@ -25,7 +25,6 @@ public partial class WebApiContext : DbContext
|
||||
public virtual DbSet<Menuitemueberkategorie> Menuitemueberkategories { get; set; }
|
||||
|
||||
public virtual DbSet<Rabatt> Rabatts { get; set; }
|
||||
public virtual DbSet<Admin> Admins{ get; set; }
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder modelBuilder)
|
||||
{
|
||||
@ -224,12 +223,6 @@ public partial class WebApiContext : DbContext
|
||||
entity.Property(e => e.Prozent).HasPrecision(8, 2);
|
||||
});
|
||||
|
||||
modelBuilder.Entity<Admin>(entity =>
|
||||
{
|
||||
entity.HasKey(e => e.Id).HasName("PRIMARY");
|
||||
entity.ToTable("admin");
|
||||
});
|
||||
|
||||
OnModelCreatingPartial(modelBuilder);
|
||||
}
|
||||
|
||||
|
@ -1,6 +0,0 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:7.0
|
||||
WORKDIR /App
|
||||
COPY . ./
|
||||
RUN dotnet restore
|
||||
EXPOSE 5226
|
||||
CMD /usr/bin/dotnet run --project /App/WebApi.csproj
|
@ -1,7 +0,0 @@
|
||||
namespace WebApi.Models;
|
||||
public partial class Admin
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public string Username { get; set; }
|
||||
public string Password { get; set; }
|
||||
}
|
@ -14,7 +14,7 @@
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"applicationUrl": "http://0.0.0.0:5226",
|
||||
"applicationUrl": "http://localhost:5226",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
|
@ -7,19 +7,18 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.8" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.8" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.8">
|
||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.4" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.5">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.8" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.8">
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.5" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.5">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="7.0.7" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="7.0.6" />
|
||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="7.0.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
@ -1,23 +0,0 @@
|
||||
version: "3.4"
|
||||
services:
|
||||
y4f-webapi:
|
||||
build: .
|
||||
ports:
|
||||
- "5226:5226"
|
||||
labels:
|
||||
- traefik.docker.network=traefik
|
||||
- traefik.enable=true
|
||||
- traefik.http.routers.y4f-webapi.entrypoints=web-secure
|
||||
- traefik.http.routers.y4f-webapi.rule=Host(`api.y4f.hopeless-cloud.xyz`)
|
||||
- traefik.http.routers.y4f-webapi.tls=true
|
||||
- traefik.http.routers.y4f-webapi.tls.certResolver=default
|
||||
networks:
|
||||
- default
|
||||
- traefik
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
default:
|
||||
name: y4f-default
|
||||
external: true
|
||||
traefik:
|
||||
external: true
|
@ -13,9 +13,9 @@
|
||||
<p>
|
||||
<strong>Yummy Kitchen</strong>
|
||||
<br />
|
||||
Meidlinger Hauptstraße 49
|
||||
Musterstraße 15
|
||||
<br />
|
||||
1120 Wien
|
||||
1010 Wien
|
||||
</p>
|
||||
|
||||
@code {
|
||||
|
@ -13,7 +13,7 @@
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"inspectUri": "{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}",
|
||||
"applicationUrl": "http://0.0.0.0:5248",
|
||||
"applicationUrl": "http://localhost:5248",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
|
@ -1,4 +1,20 @@
|
||||
<footer>
|
||||
@*<footer class="text-center text-lg-start bg-light text-muted">
|
||||
<section class="d-flex justify-content-center justify-content-lg-between p-4 border-bottom"></section>
|
||||
<section class="">
|
||||
<div class="container text-center text-md-start mt-5">
|
||||
<div class="col-md-3 col-lg-6 col-xl-12 mx-auto mb-4">
|
||||
<center>
|
||||
<h6 class="text-uppercase fw-bold mb-4">
|
||||
<a href="">Kontakt</a> | <a href="">Impressum</a> | <a href="">Datenschutzerklärung</a> | <a href="">Cookies</a>
|
||||
</h6>
|
||||
</center>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</footer>*@
|
||||
|
||||
|
||||
<footer>
|
||||
<div class="container">
|
||||
<a href="Kontakt">Kontakt</a> |
|
||||
<a href="Impressum">Impressum</a> |
|
||||
|
Loading…
Reference in New Issue
Block a user