Skip to content

Commit 125307b

Browse files
committed
.
0 parents  commit 125307b

File tree

185 files changed

+6487
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+6487
-0
lines changed

.dockerignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
**/*.bat
2+
**/*.log
3+
**/*.md
4+
**/*.yml
5+
**/.dockerignore
6+
**/.editorconfig
7+
**/.git
8+
**/.gitattributes
9+
**/.gitignore
10+
**/.vs
11+
**/.vscode
12+
**/bin
13+
**/dist
14+
**/dockerfile
15+
**/node_modules
16+
**/obj
17+
**/package-lock.json

.editorconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
insert_final_newline = true
6+
indent_size = 4
7+
indent_style = space
8+
trim_trailing_whitespace = true

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
* text=auto
2+
*.cs diff=csharp

.gitignore

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
*.bat
2+
*.log
3+
*.pdb
4+
*.suo
5+
*.tmp
6+
*.user
7+
.vs
8+
[Bb]in
9+
[Dd]ebug
10+
[Ll]og
11+
[Oo]bj
12+
[Rr]elease
13+
[Rr]eleases
14+
[Tt]est[Rr]esults
15+
dist
16+
node_modules
17+
package-lock.json

docker-compose.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
version: "3.7"
2+
3+
services:
4+
dotnetcorearchitecture_web:
5+
build:
6+
context: .
7+
dockerfile: dockerfile
8+
args:
9+
ANGULAR_ENVIRONMENT: container
10+
ASPNETCORE_ENVIRONMENT: Container
11+
image: dotnetcorearchitecture_web
12+
container_name: dotnetcorearchitecture_web
13+
depends_on:
14+
- dotnetcorearchitecture_mssqlserver
15+
networks:
16+
- network
17+
ports:
18+
- 8095:80
19+
dotnetcorearchitecture_mssqlserver:
20+
image: microsoft/mssql-server-linux
21+
container_name: dotnetcorearchitecture_mssqlserver
22+
environment:
23+
ACCEPT_EULA: Y
24+
SA_PASSWORD: P4ss-W0rd!
25+
networks:
26+
- network
27+
ports:
28+
- 1433:1433
29+
volumes:
30+
- mssql:/var/opt/mssql
31+
# dotnetcorearchitecture_mongo:
32+
# image: mongo
33+
# container_name: dotnetcorearchitecture_mongo
34+
# environment:
35+
# MONGO_INITDB_DATABASE: db
36+
# MONGO_INITDB_ROOT_PASSWORD: P4ss-W0rd
37+
# MONGO_INITDB_ROOT_USERNAME: admin
38+
# networks:
39+
# - network
40+
# ports:
41+
# - 27017:27017
42+
# volumes:
43+
# - mongo:/data/db
44+
# dotnetcorearchitecture_redis:
45+
# image: redis
46+
# container_name: dotnetcorearchitecture_redis
47+
# command: redis-server --requirepass P4ss-W0rd
48+
# networks:
49+
# - network
50+
# ports:
51+
# - 6379:6379
52+
# volumes:
53+
# - redis:/data
54+
55+
networks:
56+
network:
57+
58+
volumes:
59+
mssql:
60+
# mongo:
61+
# redis:

dockerfile

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# .NET Core SDK
2+
FROM microsoft/dotnet:2.2-sdk-alpine AS dotnetcore-sdk
3+
4+
WORKDIR /source
5+
6+
# Copy Projects
7+
COPY source/Application/DotNetCoreArchitecture.Application.csproj ./Application/
8+
COPY source/CrossCutting/DotNetCoreArchitecture.CrossCutting.csproj ./CrossCutting/
9+
COPY source/Database/DotNetCoreArchitecture.Database.csproj ./Database/
10+
COPY source/Domain/DotNetCoreArchitecture.Domain.csproj ./Domain/
11+
COPY source/Model/DotNetCoreArchitecture.Model.csproj ./Model/
12+
COPY source/Web/DotNetCoreArchitecture.Web.csproj ./Web/
13+
14+
# .NET Core Restore
15+
RUN dotnet restore ./Web/DotNetCoreArchitecture.Web.csproj
16+
17+
# Copy All Files
18+
COPY source .
19+
20+
# .NET Core Build and Publish
21+
FROM dotnetcore-sdk AS dotnetcore-build
22+
RUN dotnet publish ./Web/DotNetCoreArchitecture.Web.csproj -c Release -o /publish
23+
24+
# Angular
25+
FROM node:11.13.0-alpine AS angular-build
26+
ARG ANGULAR_ENVIRONMENT
27+
WORKDIR /frontend
28+
ENV PATH /frontend/node_modules/.bin:$PATH
29+
COPY source/Web/Frontend/package.json .
30+
RUN npm run restore
31+
COPY source/Web/Frontend .
32+
RUN npm run $ANGULAR_ENVIRONMENT
33+
34+
# ASP.NET Core Runtime
35+
FROM microsoft/dotnet:2.2-aspnetcore-runtime-alpine AS aspnetcore-runtime
36+
ARG ASPNETCORE_ENVIRONMENT
37+
ENV ASPNETCORE_ENVIRONMENT=$ASPNETCORE_ENVIRONMENT
38+
WORKDIR /app
39+
COPY --from=dotnetcore-build /publish .
40+
COPY --from=angular-build /frontend/dist ./Frontend/dist
41+
EXPOSE 80
42+
EXPOSE 443
43+
ENTRYPOINT ["dotnet", "DotNetCoreArchitecture.Web.dll"]

license.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
Permission is hereby granted, free of charge, to any person obtaining
2+
a copy of this software and associated documentation files (the
3+
"Software"), to deal in the Software without restriction, including
4+
without limitation the rights to use, copy, modify, merge, publish,
5+
distribute, sublicense, and/or sell copies of the Software, and to
6+
permit persons to whom the Software is furnished to do so, subject to
7+
the following conditions:
8+
9+
The above copyright notice and this permission notice shall be
10+
included in all copies or substantial portions of the Software.
11+
12+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
13+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
14+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
15+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
16+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
17+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
18+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

postman.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"info":{"_postman_id":"4e15bc62-321b-41a5-ab0f-c79896afcd65","name":"DotNetCoreArchitecture","schema":"https://schema.getpostman.com/json/collection/v2.1.0/collection.json"},"item":[{"name":"Users","item":[{"name":"SignInAsync","event":[{"listen":"test","script":{"id":"1dac79a0-d950-4c07-adc2-11d88d94cb60","exec":["var json = JSON.parse(responseBody);\r","pm.globals.set(\"token\", json.token);"],"type":"text/javascript"}}],"request":{"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\n\t\"login\": \"admin\",\n\t\"password\": \"admin\"\n}"},"url":{"raw":"{{url}}/users/signin","host":["{{url}}"],"path":["users","signin"]}},"response":[]},{"name":"ListAsync","request":{"auth":{"type":"bearer","bearer":[{"key":"token","value":"{{token}}","type":"string"}]},"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":{"raw":"{{url}}/users","host":["{{url}}"],"path":["users"]}},"response":[]},{"name":"SelectAsync","request":{"auth":{"type":"bearer","bearer":[{"key":"token","value":"{{token}}","type":"string"}]},"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":{"raw":"{{url}}/users/1","host":["{{url}}"],"path":["users","1"]}},"response":[]},{"name":"GridAsync","request":{"auth":{"type":"bearer","bearer":[{"key":"token","value":"{{token}}","type":"string"}]},"method":"GET","header":[],"body":{"mode":"raw","raw":""},"url":{"raw":"https://localhost:8090/Users/Grid?Page.Index=1&Page.Size=10&Order.Property=UserId&Order.Ascending=true","protocol":"https","host":["localhost"],"port":"8090","path":["Users","Grid"],"query":[{"key":"Page.Index","value":"1"},{"key":"Page.Size","value":"10"},{"key":"Order.Property","value":"UserId"},{"key":"Order.Ascending","value":"true"}]}},"response":[]},{"name":"AddAsync","request":{"auth":{"type":"bearer","bearer":[{"key":"token","value":"{{token}}","type":"string"}]},"method":"POST","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n\t\"fullName\": {\r\n\t\t\"name\": \"Name {{$timestamp}}\",\r\n\t\t\"surname\": \"Surname {{$timestamp}}\"\r\n\t},\r\n\t\"email\": \"email{{$timestamp}}@mail.com\",\r\n\t\"signIn\": {\r\n\t\t\"login\": \"{{$timestamp}}\",\r\n\t\t\"password\": \"{{$timestamp}}\"\r\n\t}\r\n}"},"url":{"raw":"{{url}}/users","host":["{{url}}"],"path":["users"]}},"response":[]},{"name":"UpdateAsync","request":{"auth":{"type":"bearer","bearer":[{"key":"token","value":"{{token}}","type":"string"}]},"method":"PUT","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n\t\"userId\": 2,\r\n\t\"fullName\": {\r\n\t\t\"name\": \"Name {{$timestamp}}\",\r\n\t\t\"surname\": \"Surname {{$timestamp}}\"\r\n\t},\r\n\t\"email\": \"email{{$timestamp}}@mail.com\",\r\n\t\"signIn\": {\r\n\t\t\"login\": \"{{$timestamp}}\",\r\n\t\t\"password\": \"{{$timestamp}}\"\r\n\t},\r\n\t\"status\": 1\r\n}"},"url":{"raw":"{{url}}/users/2","host":["{{url}}"],"path":["users","2"]}},"response":[]},{"name":"InactivateAsync","request":{"auth":{"type":"bearer","bearer":[{"key":"token","value":"{{token}}","type":"string"}]},"method":"PATCH","header":[{"key":"Content-Type","name":"Content-Type","type":"text","value":"application/json"}],"body":{"mode":"raw","raw":""},"url":{"raw":"{{url}}/users/2/inactivate","host":["{{url}}"],"path":["users","2","inactivate"]}},"response":[]},{"name":"DeleteAsync","request":{"auth":{"type":"bearer","bearer":[{"key":"token","value":"{{token}}","type":"string"}]},"method":"DELETE","header":[],"body":{"mode":"raw","raw":""},"url":{"raw":"{{url}}/users/2","host":["{{url}}"],"path":["users","2"]}},"response":[]}]}]}

0 commit comments

Comments
 (0)