-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
127 lines (85 loc) · 3.67 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
build:
dotnet build RealEstate.sln
start:
dotnet run --project RealEstate.sln
nuget:
nuget pack -NoDefaultExcludes -OutputDirectory nupkg
publish:
dotnet publish --os linux --arch x64 -c Release --self-contained
# If facing memory issues:
reset-vm:
wsl --shutdown wsl
# Docker compose with/without build
compose: # docker-compose up
docker-compose -p="realestate-microservices" up
compose-build: # docker-compose up with build
docker-compose -p="realestate-microservices" up --build
compose-down:
docker-compose -f down
dcu: # docker-compose up
docker-compose -p="realestate-microservices" up
dcd: # docker-compose down
docker-compose -f down
#clear volumes to re-initialize the DB
clear-volumes:
docker-compose down -v
# Start service alone
s-clients: #9001
docker-compose up db.clients db.messages util.rabbitmq api.clients
s-contracts: #9002
docker-compose up db.contracts db.messages util.rabbitmq api.contracts
s-external: #9003
docker-compose up db.messages util.rabbitmq api.external
s-estates: #9004
docker-compose up db.estates db.messages util.rabbitmq api.estates --build
s-listings: #9005
docker-compose up db.listings db.messages util.rabbitmq api.listings
s-messaging: #9006
docker-compose up db.messages util.rabbitmq api.messaging
s-utilities: #9007
docker-compose up db.messages util.rabbitmq api.utilities
# Build-Start service alone
b-s-gateway: #9000
docker-compose up api-gateway --build
b-s-clients: #9001
docker-compose up db.clients db.messages util.rabbitmq api.clients --build
b-s-contracts: #9002
docker-compose up db.contracts db.messages util.rabbitmq api.contracts --build
b-s-external: #9003
docker-compose up db.messages util.rabbitmq api.external --build
b-s-estates: #9004
docker-compose up db.estates db.messages util.rabbitmq api.estates --build
b-s-listings: #9005
docker-compose up db.listings db.messages util.rabbitmq api.listings --build
b-s-messaging: #9006
docker-compose up db.messages util.rabbitmq api.messaging --build
b-s-utilities: #9007
docker-compose up db.messages util.rabbitmq api.utilities --build
b-s-db:
docker-compose up db.clients db.contracts db.estates db.listings --build
# Build service alone
build-clients-ms:
docker build -t clients.api -f Microservices/ClientsMicroservice/Dockerfile Microservices/ClientsMicroservice
build-contracts-ms:
docker build -t contracts.api -f Microservices/ContractsMicroservice/Dockerfile Microservices/ContractsMicroservice
build-estates-ms:
docker build -t estates.api -f Microservices/EstatesMicroservice/Dockerfile Microservices/EstatesMicroservice
build-external-ms:
docker build -t external.api -f Microservices/ExternalAPIsMicroservice/Dockerfile Microservices/ExternalAPIsMicroservice
build-listings-ms:
docker build -t listings.api -f Microservices/ListingsMicroservice/Dockerfile Microservices/ListingsMicroservice
gw: # git docker workflow to push docker image to the repository based on the main branch
@echo triggering github workflow to push docker image to container
@echo ensure that you have the gh-cli installed and authenticated.
gh workflow run dotnet-cicd -f push_to_docker=true
# Miscelanious commands - Terraform, AWS ECS
#tp: # terraform plan
# cd terraform/environments/staging && terraform plan
#ta: # terraform apply
# cd terraform/environments/staging && terraform apply
#td: # terraform destroy
# cd terraform/environments/staging && terraform destroy
#fds: # force rededeploy aws ecs service
# aws ecs update-service --force-new-deployment --service dotnet-webapi --cluster testcluster
#publish-to-hub:
# dotnet publish --os linux --arch x64 -c Release -p:ContainerRegistry=docker.io -p:ContainerImageName=ivaaak/RealEstate --self-contained