Compare commits
No commits in common. "2024-12-15-dockerise" and "main" have entirely different histories.
2024-12-15
...
main
3 changed files with 4 additions and 52 deletions
|
@ -1,22 +1,9 @@
|
|||
steps:
|
||||
- name: Tests
|
||||
when:
|
||||
- branch: main
|
||||
event: push
|
||||
- event: tag
|
||||
image: mcr.microsoft.com/dotnet/sdk:8.0
|
||||
commands:
|
||||
- dotnet test
|
||||
|
||||
- name: Build and Publish Dev Docker Image
|
||||
when:
|
||||
- branch: dev
|
||||
event: [pull_request_closed]
|
||||
image: woodpeckerci/plugin-docker-buildx:4.2
|
||||
settings:
|
||||
platforms: linux/amd64,linux/arm64
|
||||
repo: ${CI_REG_HOST}:${CI_REG_PORT}/${CI_REPO_OWNER}/${CI_REPO_NAME}
|
||||
tags: dev
|
||||
registry: http://${CI_REG_HOST}:${CI_REG_PORT}
|
||||
insecure: true
|
||||
buildkit_config: "[registry.\"${CI_REG_HOST}:${CI_REG_PORT}\"]\n http = true\n insecure = true"
|
||||
username:
|
||||
from_secret: CI_REG_USER
|
||||
password:
|
||||
from_secret: CI_REG_TOKEN
|
||||
|
|
|
@ -13,8 +13,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution", "Solution", "{EB
|
|||
Alveus.ruleset = Alveus.ruleset
|
||||
LICENSE = LICENSE
|
||||
README.md = README.md
|
||||
.woodpecker.yml = .woodpecker.yml
|
||||
Dockerfile = Dockerfile
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Astral.Tests", "Astral.Tests\Astral.Tests.csproj", "{F0CBECAA-F279-4D94-9F83-E9EBC7A5C08C}"
|
||||
|
|
33
Dockerfile
33
Dockerfile
|
@ -1,33 +0,0 @@
|
|||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base
|
||||
USER $APP_UID
|
||||
WORKDIR /app
|
||||
EXPOSE 8080
|
||||
EXPOSE 8081
|
||||
|
||||
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
||||
ARG TARGETARCH
|
||||
ARG BUILDPLATFORM
|
||||
ARG BUILD_CONFIGURATION=Release
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
COPY ["Astral.ApiServer/Astral.ApiServer.csproj", "Astral.ApiServer/"]
|
||||
COPY ["Astral.Core/Astral.Core.csproj", "Astral.Core/"]
|
||||
COPY ["Astral.Services/Astral.Services.csproj", "Astral.Services/"]
|
||||
COPY ["Astral.DAL/Astral.DAL.csproj", "Astral.DAL/"]
|
||||
|
||||
RUN dotnet restore "Astral.ApiServer/Astral.ApiServer.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/Astral.ApiServer"
|
||||
RUN dotnet build "Astral.ApiServer.csproj" -c $BUILD_CONFIGURATION -a $TARGETARCH -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
ARG TARGETARCH
|
||||
ARG BUILD_CONFIGURATION=Release
|
||||
|
||||
RUN dotnet publish "Astral.ApiServer.csproj" --no-restore -c $BUILD_CONFIGURATION -a $TARGETARCH -o /app/publish /p:UseAppHost=false
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
ENTRYPOINT ["dotnet", "Astral.ApiServer.dll"]
|
Loading…
Reference in a new issue