Compare commits
3 Commits
a44912ac87
...
v2.0.1
| Author | SHA1 | Date | |
|---|---|---|---|
| a50bd4cf65 | |||
| 238202c45b | |||
| f49705b70f |
@ -1,26 +0,0 @@
|
|||||||
name: Build and Push Docker Image
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
container:
|
|
||||||
image: mcr.microsoft.com/dotnet/sdk:9.0
|
|
||||||
steps:
|
|
||||||
- name: Install Node.js and dependencies
|
|
||||||
run: |
|
|
||||||
apt-get update
|
|
||||||
apt-get install -y curl gnupg
|
|
||||||
curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
|
|
||||||
apt-get install -y nodejs git
|
|
||||||
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
|
|
||||||
- name: Restore dependencies
|
|
||||||
run: dotnet restore ./code/MessengerApi/MessengerApi.csproj
|
|
||||||
|
|
||||||
- name: Build project
|
|
||||||
run: dotnet build ./code/MessengerApi/MessengerApi.csproj -c Release
|
|
||||||
@ -6,6 +6,11 @@ namespace MessengerApi.Configuration.Parsers
|
|||||||
{
|
{
|
||||||
public static PersistenceTypes Parse(string value)
|
public static PersistenceTypes Parse(string value)
|
||||||
{
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(value))
|
||||||
|
{
|
||||||
|
return PersistenceTypes.Sql;
|
||||||
|
}
|
||||||
|
|
||||||
return (PersistenceTypes)Enum.Parse(typeof(PersistenceTypes), value, true);
|
return (PersistenceTypes)Enum.Parse(typeof(PersistenceTypes), value, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,7 +28,6 @@ EndProject
|
|||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8EC462FD-D22E-90A8-E5CE-7E832BA40C5D}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8EC462FD-D22E-90A8-E5CE-7E832BA40C5D}"
|
||||||
ProjectSection(SolutionItems) = preProject
|
ProjectSection(SolutionItems) = preProject
|
||||||
..\Directory.Packages.props = ..\Directory.Packages.props
|
..\Directory.Packages.props = ..\Directory.Packages.props
|
||||||
..\docker-compose.yml = ..\docker-compose.yml
|
|
||||||
..\Dockerfile = ..\Dockerfile
|
..\Dockerfile = ..\Dockerfile
|
||||||
..\assets\example-users.config = ..\assets\example-users.config
|
..\assets\example-users.config = ..\assets\example-users.config
|
||||||
..\NuGet.config = ..\NuGet.config
|
..\NuGet.config = ..\NuGet.config
|
||||||
@ -36,7 +35,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
|
||||||
ProjectSection(SolutionItems) = preProject
|
ProjectSection(SolutionItems) = preProject
|
||||||
..\.gitea\workflows\build.yml = ..\.gitea\workflows\build.yml
|
|
||||||
..\.gitea\workflows\docker-build-and-push.yml = ..\.gitea\workflows\docker-build-and-push.yml
|
..\.gitea\workflows\docker-build-and-push.yml = ..\.gitea\workflows\docker-build-and-push.yml
|
||||||
EndProjectSection
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
|
|||||||
@ -1,8 +0,0 @@
|
|||||||
#See https://aka.ms/customizecontainer to learn how to customize your debug container and how Visual Studio uses this Dockerfile to build your images for faster debugging.
|
|
||||||
|
|
||||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
|
|
||||||
USER app
|
|
||||||
WORKDIR /app
|
|
||||||
EXPOSE 8080
|
|
||||||
COPY ./publish .
|
|
||||||
ENTRYPOINT ["dotnet", "MessengerApi.dll"]
|
|
||||||
@ -4,7 +4,6 @@
|
|||||||
"commandName": "Project",
|
"commandName": "Project",
|
||||||
"launchBrowser": true,
|
"launchBrowser": true,
|
||||||
"environmentVariables": {
|
"environmentVariables": {
|
||||||
"PERSISTENCE_TYPE": "Sql",
|
|
||||||
"USERSCONFIG_FILE_PATH": "./../../assets/example-users.config",
|
"USERSCONFIG_FILE_PATH": "./../../assets/example-users.config",
|
||||||
"SQL_CONNECTIONSTRING": ""
|
"SQL_CONNECTIONSTRING": ""
|
||||||
"CORS_ORIGINS": "",
|
"CORS_ORIGINS": "",
|
||||||
|
|||||||
@ -1,7 +0,0 @@
|
|||||||
services:
|
|
||||||
messengerapi:
|
|
||||||
image: https://gitea.masita.net/mc/messengerapi:latest
|
|
||||||
container_name: messengerapi
|
|
||||||
restart: unless-stopped
|
|
||||||
environment:
|
|
||||||
- ASPNETCORE_ENVIRONMENT=Production
|
|
||||||
Reference in New Issue
Block a user