add drone and docker files
parent
ad4044e712
commit
0fadf3bc21
|
|
@ -0,0 +1,2 @@
|
||||||
|
bin/
|
||||||
|
obj/
|
||||||
19
OFBButte.sln
19
OFBButte.sln
|
|
@ -3,17 +3,24 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio Version 16
|
# Visual Studio Version 16
|
||||||
VisualStudioVersion = 16.0.29102.190
|
VisualStudioVersion = 16.0.29102.190
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OFBButte.Api", "OFBButte.Api\OFBButte.Api.csproj", "{FF5F4D78-6419-47E4-A7CE-5B25503BE2D7}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OFBButte.Api", "OFBButte.Api\OFBButte.Api.csproj", "{FF5F4D78-6419-47E4-A7CE-5B25503BE2D7}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OFBButte.Application", "OFBButte.Application\OFBButte.Application.csproj", "{8BCA31C6-C10D-4865-BAE8-6DC932B4797D}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OFBButte.Application", "OFBButte.Application\OFBButte.Application.csproj", "{8BCA31C6-C10D-4865-BAE8-6DC932B4797D}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OFBButte.Console", "OFBButte.Console\OFBButte.Console.csproj", "{82FA36EC-1CBC-4F9A-B436-A61D9AA6D1C7}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OFBButte.Console", "OFBButte.Console\OFBButte.Console.csproj", "{82FA36EC-1CBC-4F9A-B436-A61D9AA6D1C7}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OFBButte.Database", "OFBButte.Database\OFBButte.Database.csproj", "{64A05F44-4BB2-45CE-A343-6307EA8F099A}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OFBButte.Database", "OFBButte.Database\OFBButte.Database.csproj", "{64A05F44-4BB2-45CE-A343-6307EA8F099A}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OFBButte.Infrastructure", "OFBButte.Infrastructure\OFBButte.Infrastructure.csproj", "{157A1CB3-9320-4FE6-ABC5-1C9EF1952540}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OFBButte.Infrastructure", "OFBButte.Infrastructure\OFBButte.Infrastructure.csproj", "{157A1CB3-9320-4FE6-ABC5-1C9EF1952540}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OFBButte.Entities", "OFBButte.Entities\OFBButte.Entities.csproj", "{39A5BAF9-E108-4B81-8DBB-A7C1A6CEA9EF}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OFBButte.Entities", "OFBButte.Entities\OFBButte.Entities.csproj", "{39A5BAF9-E108-4B81-8DBB-A7C1A6CEA9EF}"
|
||||||
|
EndProject
|
||||||
|
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{94EB31EF-5894-4F6C-96B8-FA23DB42B2B4}"
|
||||||
|
ProjectSection(SolutionItems) = preProject
|
||||||
|
.dockerignore = .dockerignore
|
||||||
|
dockerfile = dockerfile
|
||||||
|
drone.yml = drone.yml
|
||||||
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
FROM mcr.microsoft.com/dotnet/core/sdk:2.2 AS build-env
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy csproj and restore as distinct layers
|
||||||
|
COPY *.csproj ./
|
||||||
|
RUN dotnet restore
|
||||||
|
|
||||||
|
# Copy everything else and build
|
||||||
|
COPY . ./
|
||||||
|
RUN dotnet publish -c Release -o out
|
||||||
|
|
||||||
|
# Build runtime image
|
||||||
|
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=build-env /app/out .
|
||||||
|
ENTRYPOINT ["dotnet", "aspnetapp.dll 8222"]
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: default
|
||||||
|
steps:
|
||||||
|
- name: node
|
||||||
|
image: docker
|
||||||
|
volumes:
|
||||||
|
- name: docker_sock
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
commands:
|
||||||
|
- docker build --tag ofb_api .
|
||||||
|
- docker rm -f ofb_api || true
|
||||||
|
- docker run --name ofb_api --restart always -d -p "8222:8222" ofb_api
|
||||||
|
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: docker_sock
|
||||||
|
host:
|
||||||
|
path: /var/run/docker.sock
|
||||||
Loading…
Reference in New Issue