James Tombleson
799668a059
* Still working though it but looking good on releases * added the example discord message test * updated source repo to return an existing record before a new is added * updated the sources repo interface * updated new routes to check for existing records * starting to migrate the seed out of the sql migrations * A new seed script was made to reload the db from the api * Docker image works locally * Adding CI to build docker image * ... disabled swagger so I can test docker * Added more to the github job but its not finished. Isnt pulling sources yet. * cleaned up formatting * Controller updates to look for existing records when requesting a new one * null check cleanup * namespace fix
34 lines
801 B
Docker
34 lines
801 B
Docker
FROM golang:latest as goose
|
|
|
|
RUN go install github.com/pressly/goose/v3/cmd/goose@latest
|
|
|
|
FROM mcr.microsoft.com/dotnet/sdk:7.0.103 as build
|
|
|
|
COPY . /app
|
|
WORKDIR /app
|
|
|
|
RUN dotnet restore
|
|
RUN dotnet build
|
|
|
|
FROM build AS publish
|
|
RUN dotnet publish -c Release -o /app/publish
|
|
|
|
RUN dotnet publish -o build
|
|
#--self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true
|
|
RUN ls build
|
|
|
|
FROM mcr.microsoft.com/dotnet/aspnet:7.0.3 as app
|
|
|
|
ENV ASPNETCORE_URLS=http://*:5000
|
|
ENV DOTNET_URLS=http://*:5000
|
|
|
|
#RUN apt-get install chromium -y
|
|
|
|
WORKDIR /app
|
|
|
|
RUN mkdir /migrations
|
|
COPY --from=publish /app/build /app
|
|
COPY --from=build ./app/Newsbot.Collector.Database/Migrations/ /app/migrations
|
|
COPY --from=goose /go/bin/goose /app
|
|
|
|
ENTRYPOINT [ "dotnet", "Newsbot.Collector.Api.dll" ] |