diff --git a/.dockerignore b/.dockerignore
deleted file mode 100644
index cd967fc..0000000
--- a/.dockerignore
+++ /dev/null
@@ -1,25 +0,0 @@
-**/.dockerignore
-**/.env
-**/.git
-**/.gitignore
-**/.project
-**/.settings
-**/.toolstarget
-**/.vs
-**/.vscode
-**/.idea
-**/*.*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/.github/config/gitversion.yml b/.github/config/gitversion.yml
deleted file mode 100644
index dbd1c3a..0000000
--- a/.github/config/gitversion.yml
+++ /dev/null
@@ -1,11 +0,0 @@
-next-version: 0.5.0
-assembly-versioning-scheme: MajorMinorPatch
-assembly-file-versioning-scheme: MajorMinorPatch
-
-branches:
- master:
- regex: ^master$
- mode: ContinuousDelivery
- increment: Patch
- tag: ''
- is-release-branch: true
diff --git a/.github/workflows/dev_pr.yml b/.github/workflows/dev_pr.yml
deleted file mode 100644
index 8a66de2..0000000
--- a/.github/workflows/dev_pr.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-name: "Pull request to 'dev' branch"
-
-on:
- pull_request:
- branches:
- - "dev/**"
- paths:
- - 'WatchIt**'
-
-jobs:
- build:
- name: Dotnet solution build test and unit tests execution
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Setup .NET
- uses: actions/setup-dotnet@v4
- with:
- dotnet-version: 9.0.x
- - name: Restore dependencies
- run: dotnet restore
- - name: Build
- run: dotnet build --no-restore
- - name: Test
- run: dotnet test --no-build --verbosity normal
diff --git a/.github/workflows/dev_push.yml b/.github/workflows/dev_push.yml
deleted file mode 100644
index b57596d..0000000
--- a/.github/workflows/dev_push.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-name: "Push to 'dev' branch"
-
-on:
- push:
- branches:
- - "dev/**"
- paths:
- - 'WatchIt**'
-
-jobs:
- build:
- name: Dotnet solution build test and unit tests execution
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Setup .NET
- uses: actions/setup-dotnet@v4
- with:
- dotnet-version: 9.0.x
- - name: Restore dependencies
- run: dotnet restore
- - name: Build
- run: dotnet build --no-restore
- - name: Test
- run: dotnet test --no-build --verbosity normal
diff --git a/.github/workflows/master_pr.yml b/.github/workflows/master_pr.yml
deleted file mode 100644
index 3dae43b..0000000
--- a/.github/workflows/master_pr.yml
+++ /dev/null
@@ -1,45 +0,0 @@
-name: "Pull request to 'master' branch"
-
-on:
- pull_request:
- branches:
- - "master"
-
-jobs:
- build-dotnet:
- name: Dotnet solution build test and unit tests execution
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Setup .NET
- uses: actions/setup-dotnet@v4
- with:
- dotnet-version: 9.0.x
- - name: Restore dependencies
- run: dotnet restore
- - name: Build solution
- run: dotnet build --no-restore
- - name: Test
- run: dotnet test --no-build --verbosity normal
- build-docker:
- name: Docker image build test
- needs: build-dotnet
- runs-on: ubuntu-latest
- strategy:
- matrix:
- app:
- - WatchIt.WebAPI
- - WatchIt.Website
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v3
- - name: Convert name to lowercase
- id: name
- uses: ASzc/change-string-case-action@v1
- with:
- string: ${{ matrix.app }}
- - name: Build image
- run: docker build ${{ github.workspace }} -t ghcr.io/${{github.actor}}/${{ steps.name.outputs.lowercase }}:build-test -f ${{ github.workspace }}/${{ matrix.app }}/Dockerfile
diff --git a/.github/workflows/master_push.yml b/.github/workflows/master_push.yml
deleted file mode 100644
index ab5b4de..0000000
--- a/.github/workflows/master_push.yml
+++ /dev/null
@@ -1,123 +0,0 @@
-name: "Push to 'master' branch"
-
-on:
- push:
- branches:
- - "master"
-
-jobs:
- publish:
- name: Publish
- runs-on: ubuntu-latest
- strategy:
- matrix:
- app:
- - WatchIt.WebAPI
- - WatchIt.Website
- steps:
- - name: Checkout
- uses: actions/checkout@v4
- with:
- fetch-depth: 0
- - name: Setup GitVersion
- uses: gittools/actions/gitversion/setup@v0.9.7
- with:
- versionSpec: 5.x
- - name: Determine Version
- uses: gittools/actions/gitversion/execute@v0.9.7
- id: gitversion
- with:
- useConfigFile: true
- configFilePath: .github/config/gitversion.yml
- - name: App Settings Variable Substitution for WatchIt.WebAPI
- uses: microsoft/variable-substitution@v1
- if: ${{ matrix.app == 'WatchIt.WebAPI' }}
- with:
- files: ${{ github.workspace }}/${{ matrix.app }}/appsettings.json
- env:
- ConnectionStrings.Database: ${{ secrets.CONNECTION_STRING }}
- Authentication.JWT.Key: ${{ secrets.KEY }}
- - name: App Settings Variable Substitution for WatchIt.Website
- uses: microsoft/variable-substitution@v1
- if: ${{ matrix.app == 'WatchIt.Website' }}
- with:
- files: ${{ github.workspace }}/${{ matrix.app }}/appsettings.json
- env:
- Clients.BaseAddress: ${{ secrets.API_URL }}
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v3
- - name: Login to GitHub Container Registry
- uses: docker/login-action@v1
- with:
- registry: ghcr.io
- username: ${{github.actor}}
- password: ${{secrets.GITHUB_TOKEN}}
- - name: Convert name to lowercase
- id: name
- uses: ASzc/change-string-case-action@v1
- with:
- string: ${{ matrix.app }}
- - name: Build image
- run: docker build ${{ github.workspace }} -t ghcr.io/${{github.actor}}/${{ steps.name.outputs.lowercase }}:latest -t ghcr.io/${{github.actor}}/${{ steps.name.outputs.lowercase }}:${{steps.gitversion.outputs.SemVer}} -f ${{ github.workspace }}/${{ matrix.app }}/Dockerfile
- - name: Publish image
- run: docker push ghcr.io/${{github.actor}}/${{ steps.name.outputs.lowercase }} --all-tags
- outputs:
- version: ${{ steps.gitversion.outputs.SemVer }}
- release:
- name: Release
- runs-on: ubuntu-latest
- needs: publish
- steps:
- - name: Create Release
- uses: actions/create-release@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- tag_name: ${{needs.publish.outputs.version}}
- release_name: ${{needs.publish.outputs.version}}
- draft: false
- prerelease: false
- deploy:
- name: Deploy
- runs-on: watchit
- needs: publish
- if: false
- steps:
- - name: Login to GitHub Container Registry
- uses: docker/login-action@v1
- with:
- registry: ghcr.io
- username: ${{github.actor}}
- password: ${{secrets.GITHUB_TOKEN}}
- - name: Stop old WatchIt.WebAPI container
- continue-on-error: true
- run: docker container stop watchit.webapi
- - name: Remove old WatchIt.WebAPI container
- continue-on-error: true
- run: docker container rm watchit.webapi
- - name: Remove old WatchIt.WebAPI image
- continue-on-error: true
- run: docker image rm ghcr.io/mateuszskoczek/watchit.webapi
- - name: Stop old WatchIt.Website container
- continue-on-error: true
- run: docker container stop watchit.website
- - name: Remove old WatchIt.Website container
- continue-on-error: true
- run: docker container rm watchit.website
- - name: Remove old WatchIt.Website image
- continue-on-error: true
- run: docker image rm ghcr.io/mateuszskoczek/watchit.website
- - name: Pull new WatchIt.WebAPI image
- run: docker pull ghcr.io/mateuszskoczek/watchit.webapi:latest
- - name: Pull new WatchIt.Website image
- run: docker pull ghcr.io/mateuszskoczek/watchit.website:latest
- - name: Run new WatchIt.WebAPI container
- run: docker run -p 1080:8080 -v watchit.webapi:/home/app -d --name watchit.webapi ghcr.io/mateuszskoczek/watchit.webapi:latest
- - name: Run new WatchIt.Website container
- run: docker run -p 80:8080 -v watchit.website:/home/app -d --name watchit.website ghcr.io/mateuszskoczek/watchit.website:latest
- - name: Wait for initialization
- run: sleep 10
- - name: Check WatchIt.WebAPI container health
- run: docker ps | grep "watchit.webapi"
- - name: Check WatchIt.Website container health
- run: docker ps | grep "watchit.website"
diff --git a/WatchIt.WebAPI/Dockerfile b/WatchIt.WebAPI/Dockerfile
deleted file mode 100644
index 873de8f..0000000
--- a/WatchIt.WebAPI/Dockerfile
+++ /dev/null
@@ -1,25 +0,0 @@
-FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
-USER $APP_UID
-WORKDIR /app
-EXPOSE 8080
-EXPOSE 8081
-
-FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
-ARG BUILD_CONFIGURATION=Release
-WORKDIR /src
-COPY ["WatchIt.WebAPI/WatchIt.WebAPI.csproj", "WatchIt.WebAPI/"]
-COPY ["WatchIt.Database/WatchIt.Database.csproj", "WatchIt.Database/"]
-COPY ["WatchIt.DTO/WatchIt.DTO.csproj", "WatchIt.DTO/"]
-RUN dotnet restore "WatchIt.WebAPI/WatchIt.WebAPI.csproj"
-COPY . .
-WORKDIR "/src/WatchIt.WebAPI"
-RUN dotnet build "WatchIt.WebAPI.csproj" -c $BUILD_CONFIGURATION -o /app/build
-
-FROM build AS publish
-ARG BUILD_CONFIGURATION=Release
-RUN dotnet publish "WatchIt.WebAPI.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
-
-FROM base AS final
-WORKDIR /app
-COPY --from=publish /app/publish .
-ENTRYPOINT ["dotnet", "WatchIt.WebAPI.dll"]
diff --git a/WatchIt.WebAPI/WatchIt.WebAPI.csproj b/WatchIt.WebAPI/WatchIt.WebAPI.csproj
index f7e5dfe..35f192a 100644
--- a/WatchIt.WebAPI/WatchIt.WebAPI.csproj
+++ b/WatchIt.WebAPI/WatchIt.WebAPI.csproj
@@ -30,12 +30,6 @@
-
-
- .dockerignore
-
-
-
<_ContentIncludedByDefault Remove="WatchIt.WebAPI.Controllers\obj\project.assets.json" />
<_ContentIncludedByDefault Remove="WatchIt.WebAPI.Controllers\obj\project.packagespec.json" />
diff --git a/WatchIt.WebAPI/appsettings.json b/WatchIt.WebAPI/appsettings.json
index 4fc8fc7..22fb5b8 100644
--- a/WatchIt.WebAPI/appsettings.json
+++ b/WatchIt.WebAPI/appsettings.json
@@ -8,7 +8,7 @@
},
"AllowedHosts": "*",
"ConnectionStrings": {
- "Database": "Host=192.168.55.70;Database=watchit_dev;Username=watchit;Password=Xdv2Etchavbuuho;Include Error Detail=True"
+ "Database": "Host=localhost;Database=watchit;Username=admin;Password=6&f!jdoqYBsW8lB;Include Error Detail=True"
},
"Authentication": {
"JWT": {
diff --git a/WatchIt.Website/Dockerfile b/WatchIt.Website/Dockerfile
deleted file mode 100644
index c9a70a5..0000000
--- a/WatchIt.Website/Dockerfile
+++ /dev/null
@@ -1,25 +0,0 @@
-FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
-USER $APP_UID
-WORKDIR /app
-EXPOSE 8080
-EXPOSE 8081
-
-FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
-ARG BUILD_CONFIGURATION=Release
-WORKDIR /src
-COPY ["WatchIt.Website/WatchIt.Website.csproj", "WatchIt.Website/"]
-COPY ["WatchIt.DTO/WatchIt.DTO.csproj", "WatchIt.DTO/"]
-COPY ["WatchIt.Database/WatchIt.Database.csproj", "WatchIt.Database/"]
-RUN dotnet restore "WatchIt.Website/WatchIt.Website.csproj"
-COPY . .
-WORKDIR "/src/WatchIt.Website"
-RUN dotnet build "WatchIt.Website.csproj" -c $BUILD_CONFIGURATION -o /app/build
-
-FROM build AS publish
-ARG BUILD_CONFIGURATION=Release
-RUN dotnet publish "WatchIt.Website.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
-
-FROM base AS final
-WORKDIR /app
-COPY --from=publish /app/publish .
-ENTRYPOINT ["dotnet", "WatchIt.Website.dll"]
diff --git a/WatchIt.Website/WatchIt.Website.csproj b/WatchIt.Website/WatchIt.Website.csproj
index 5e0064e..405415c 100644
--- a/WatchIt.Website/WatchIt.Website.csproj
+++ b/WatchIt.Website/WatchIt.Website.csproj
@@ -86,11 +86,4 @@
<_ContentIncludedByDefault Remove="WatchIt.Website.Services\WatchIt.Website.Services.Tokens\obj\project.packagespec.json" />
<_ContentIncludedByDefault Remove="WatchIt.Website.Services\WatchIt.Website.Services.Tokens\obj\WatchIt.Website.Services.Tokens.csproj.nuget.dgspec.json" />
-
-
-
- .dockerignore
-
-
-
diff --git a/WatchIt.Website/appsettings.json b/WatchIt.Website/appsettings.json
index 612ecf5..4dbf2fd 100644
--- a/WatchIt.Website/appsettings.json
+++ b/WatchIt.Website/appsettings.json
@@ -7,7 +7,7 @@
},
"AllowedHosts": "*",
"Clients": {
- "BaseAddress": "https://localhost:7027"
+ "BaseAddress": "http://localhost:5128"
},
"Tokens": {
"StorageKeys": {