Skip to content

Commit

Permalink
Refactor working directory and add resource group creation in azure-d…
Browse files Browse the repository at this point in the history
…eploy-image-test.yml
  • Loading branch information
crlsocro committed Sep 19, 2024
1 parent e98c78c commit 680ed4f
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/deployBicepFile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ jobs:
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: Resource Group Test
run: |
az deployment sub create \
--location norwayeast \
--template-file infra/modules/resourceGroup.bicep \
--parameters resourceGroupName='rg-bds-test' resourceGroupLocation='norwayeast' \
--subscription ${{ secrets.AZURE_SUBSCRIPTION }}
- name: Deploy Azure Container Registry
uses: azure/arm-deploy@v1
with:
Expand Down
19 changes: 19 additions & 0 deletions Bouvet.Developer.Survey.Backend/Dockerfile.CI
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine

# if you use databases, these lines need to be uncommented
RUN apk add --no-cache icu-libs
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false

# if you depend on timezones, these lines need to be uncommented
# RUN apk add --no-cache tzdata
# ENV TZ=Europe/Oslo

WORKDIR /app
COPY ["./Bouvet.Developer.Survey.Api/Bouvet.Developer.Survey.Api.csproj", "Bouvet.Developer.Survey.Api/"]
COPY ["./Bouvet.Developer.Survey.Domain/Bouvet.Developer.Survey.Domain.csproj", "Bouvet.Developer.Survey.Domain/"]
COPY ["./Bouvet.Developer.Survey.Infrastructure/Bouvet.Developer.Survey.Infrastructure.csproj", "Bouvet.Developer.Survey.Infrastructure/"]
COPY ["./Bouvet.Developer.Survey.Service/Bouvet.Developer.Survey.Service.csproj", "Bouvet.Developer.Survey.Service/"]

USER app
EXPOSE 8080
ENTRYPOINT ["dotnet", "Bouvet.Developer.Survey.Api.dll"]
9 changes: 9 additions & 0 deletions infra/modules/resourceGroup.bicep
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
targetScope='subscription'

param resourceGroupName string
param resourceGroupLocation string

resource newRG 'Microsoft.Resources/resourceGroups@2024-03-01' = {
name: resourceGroupName
location: resourceGroupLocation
}

0 comments on commit 680ed4f

Please sign in to comment.