-
-
Notifications
You must be signed in to change notification settings - Fork 689
DevOps
Ivan Paulovich edited this page Jan 15, 2020
·
2 revisions
- Running the Application Locally
- Running the Tests Locally
- Continuous Integration & Continuous Deployment
Manga is a cross-platform application, you can run it from Mac, Windows or Unix. To develop new features, you may use Visual Studio or Visual Studio Code ❤️.
The single requirement is to install the latest .NET Code SDK.
We made available scripts to create and seed the database quickly via Docker.
Finally to run it locally use:
dotnet run --project "src/WebApi/WebApi.csproj"
Run the following command at the root folder:
dotnet test
version: '1.0.{build}'
image:
- Ubuntu
environment:
DOCKER_USER:
secure: YnlezJhfKFUWo+E5/WCikQ==
DOCKER_PASS:
secure: iwibHSi3B80XJ3KjT1sAS1c66AsaOP3UFyUKKWrL1jo=
HEROKU_USERNAME:
secure: CUWu9AI7dgCvD7XMGYEDtb7XQlvkcOSuxpdaKdzOu/M=
HEROKU_API_KEY:
secure: XEo5yF9x7hReDhlb66Aj6xnk2HOFboVzNW6BLR1+shV7MP1DhRl8J+hHg8Do7OKl
HEROKU_APP_NAME:
secure: tKa7ydQJbbA+uovQNa5sBs9OcRWsCj71r4l9wvDG7/I=
services:
- docker
dotnet_csproj:
patch: true
file: '**\*.csproj'
version: '{version}'
build_script:
- docker pull mcr.microsoft.com/mssql/server:2017-latest || true
- docker run -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=<YourStrong!Passw0rd>' -p 1433:1433 --name sql1 -d mcr.microsoft.com/mssql/server:2017-latest || true
- sleep 10
- docker exec -i sql1 /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P '<YourStrong!Passw0rd>' -Q 'ALTER LOGIN SA WITH PASSWORD="<YourNewStrong!Passw0rd>"' || true
- dotnet ef database update --project src/Infrastructure --startup-project src/WebApi
- dotnet build
- pushd src/WebApi/
- dotnet pack --configuration Release
- popd
test_script:
- dotnet test test/UnitTests/UnitTests.csproj
- dotnet test test/IntegrationTests/IntegrationTests.csproj
- dotnet test test/AcceptanceTests/AcceptanceTests.csproj
deploy_script:
- docker build -t ivanpaulovich/clean-architecture-manga:github .
- docker login -u="$DOCKER_USER" -p="$DOCKER_PASS"
- docker push ivanpaulovich/clean-architecture-manga:github
- docker login --username=$HEROKU_USERNAME --password=$HEROKU_API_KEY registry.heroku.com
- docker tag ivanpaulovich/clean-architecture-manga:github registry.heroku.com/$HEROKU_APP_NAME/web
- docker push registry.heroku.com/$HEROKU_APP_NAME/web
- curl https://cli-assets.heroku.com/install.sh | sh
- heroku container:release web -a $HEROKU_APP_NAME
- Value Object
- Entity
- Aggregate Root
- Repository
- Use Case
- Bounded Context
- Entity Factory
- Domain Service
- Application Service
- Single Responsibility Principle
- Open-Closed Principle
- Liskov Substitution Principle
- Interface Segregation Principle
- Dependency Inversion Principle
- Swagger and API Versioning
- Microsoft Extensions
- Feature Flags
- Logging
- Data Annotations
- Authentication
- Authorization