diff --git a/src/Services/c-gen/.dockerignore b/src/Services/c-gen/.dockerignore new file mode 100644 index 00000000..bdca33b4 --- /dev/null +++ b/src/Services/c-gen/.dockerignore @@ -0,0 +1,25 @@ +**/.classpath +**/.dockerignore +**/.env +**/.git +**/.gitignore +**/.project +**/.settings +**/.toolstarget +**/.vs +**/.vscode +**/*.*proj.user +**/*.dbmdl +**/*.jfm +**/azds.yaml +**/bin +**/charts +**/docker-compose* +**/Dockerfile* +**/node_modules +**/npm-debug.log +**/obj +**/secrets.dev.yaml +**/values.dev.yaml +LICENSE +README.md \ No newline at end of file diff --git a/src/Services/c-gen/O2NextGen.CertificateManagement.Api/Dockerfile b/src/Services/c-gen/O2NextGen.CertificateManagement.Api/Dockerfile new file mode 100644 index 00000000..b2fc8d4b --- /dev/null +++ b/src/Services/c-gen/O2NextGen.CertificateManagement.Api/Dockerfile @@ -0,0 +1,24 @@ +#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging. + +FROM mcr.microsoft.com/dotnet/core/aspnet:2.2-stretch-slim AS base +WORKDIR /app +EXPOSE 80 + +FROM mcr.microsoft.com/dotnet/core/sdk:2.2-stretch AS build +WORKDIR /src +COPY ["O2NextGen.CertificateManagement.Api/O2NextGen.CertificateManagement.Api.csproj", "O2NextGen.CertificateManagement.Api/"] +COPY ["O2NextGen.CertificateManagement.Business/O2NextGen.CertificateManagement.Business.csproj", "O2NextGen.CertificateManagement.Business/"] +COPY ["O2NextGen.CertificateManagement.Data/O2NextGen.CertificateManagement.Data.csproj", "O2NextGen.CertificateManagement.Data/"] +COPY ["O2NextGen.CertificateManagement.Impl/O2NextGen.CertificateManagement.Impl.csproj", "O2NextGen.CertificateManagement.Impl/"] +RUN dotnet restore "O2NextGen.CertificateManagement.Api/O2NextGen.CertificateManagement.Api.csproj" +COPY . . +WORKDIR "/src/O2NextGen.CertificateManagement.Api" +RUN dotnet build "O2NextGen.CertificateManagement.Api.csproj" -c Release -o /app/build + +FROM build AS publish +RUN dotnet publish "O2NextGen.CertificateManagement.Api.csproj" -c Release -o /app/publish + +FROM base AS final +WORKDIR /app +COPY --from=publish /app/publish . +ENTRYPOINT ["dotnet", "O2NextGen.CertificateManagement.Api.dll"] diff --git a/src/Services/c-gen/O2NextGen.CertificateManagement.Api/O2NextGen.CertificateManagement.Api.csproj b/src/Services/c-gen/O2NextGen.CertificateManagement.Api/O2NextGen.CertificateManagement.Api.csproj index 4403b80d..87b303c6 100644 --- a/src/Services/c-gen/O2NextGen.CertificateManagement.Api/O2NextGen.CertificateManagement.Api.csproj +++ b/src/Services/c-gen/O2NextGen.CertificateManagement.Api/O2NextGen.CertificateManagement.Api.csproj @@ -11,23 +11,17 @@ - - 2.2.0 + - - 2.1.1 + - - 2.2.0 + - - 1.5.0 + - - 2.1.0 + - - 2.2.0 + diff --git a/src/docker-compose.override.yml b/src/docker-compose.override.yml new file mode 100644 index 00000000..87fc3ec7 --- /dev/null +++ b/src/docker-compose.override.yml @@ -0,0 +1,8 @@ +version: '3.4' +services: + certificate.api: + environment: + - ASPNETCORE_ENVIRONMENT=Development + - ConnectionString=${O2_AZURE_IDENTITY_DB:-Server=sql.data;Database=O2Bionics.o2nextgen.CertificateDb;User Id=sa;Password=Pass@word;} + ports: + - "10102:80" \ No newline at end of file diff --git a/src/docker-compose.yaml b/src/docker-compose.yaml new file mode 100644 index 00000000..354e9402 --- /dev/null +++ b/src/docker-compose.yaml @@ -0,0 +1,33 @@ +version: '3.4' +networks: + frontend: + backend: + +services: + sql.data: + image: mcr.microsoft.com/mssql/server:2017-latest + container_name: sqldatacontainer + environment: + - SA_PASSWORD=Pass@word + - ACCEPT_EULA=Y + # - MSSQL_PID=Developer + ports: + - "1433:1433" + networks: + - backend + + certificate.api: + image: ${DOCKER_REGISTRY:-o2nextgen}/cgen.api:${PLATFORM:-linux}-${TAG:-latest} + build: + context: Services/c-gen/O2NextGen.CertificateManagement.Api/ + dockerfile: Dockerfile + environment: + - ASPNETCORE_ENVIRONMENT=Development + - ConnectionString=${O2_AZURE_IDENTITY_DB:-Server=sql.data;Database=O2Bionics.o2nextgen.CertificateDb;User Id=sa;Password=Pass@word;} + depends_on: + - sql.data + ports: + - "10102:80" + networks: + - backend + - frontend