mirror of
https://github.com/alex289/CleanArchitecture.git
synced 2025-08-22 19:28:34 +00:00
feat: Extend documentation for aspire
This commit is contained in:
parent
7a166d15c4
commit
189b9004b7
10
Readme.md
10
Readme.md
@ -25,17 +25,21 @@ The project uses the following dependencies:
|
|||||||
- **gRPC**: gRPC is an open-source remote procedure call framework that enables efficient communication between distributed systems using a variety of programming languages and protocols.
|
- **gRPC**: gRPC is an open-source remote procedure call framework that enables efficient communication between distributed systems using a variety of programming languages and protocols.
|
||||||
|
|
||||||
## Running the Project
|
## Running the Project
|
||||||
To run the project, follow these steps:
|
|
||||||
|
|
||||||
|
To run the project, follow these steps:
|
||||||
|
|
||||||
1. Clone the repository to your local machine.
|
1. Clone the repository to your local machine.
|
||||||
2. Open the solution in your IDE of choice.
|
2. Open the solution in your IDE of choice.
|
||||||
3. Build the solution to restore the dependencies.
|
3. Build the solution to restore the dependencies.
|
||||||
4. Update the connection string in the appsettings.json file to point to your database.
|
4. Update the connection string in the appsettings.json file to point to your database.
|
||||||
5. Start the API project
|
5. Start the API project (Alterntively you can use the `dotnet run --project CleanArchitecture.Api` command)
|
||||||
6. The database migrations will be automatically applied on start-up. If the database does not exist, it will be created.
|
6. The database migrations will be automatically applied on start-up. If the database does not exist, it will be created.
|
||||||
7. The API should be accessible at `https://localhost:<port>/api/<controller>` where `<port>` is the port number specified in the project properties and `<controller>` is the name of the API controller.
|
7. The API should be accessible at `https://localhost:<port>/api/<controller>` where `<port>` is the port number specified in the project properties and `<controller>` is the name of the API controller.
|
||||||
|
|
||||||
|
### Using Aspire
|
||||||
|
|
||||||
|
1. Run `dotnet run --project CleanArchitecture.AppHost` in the root directory of the project.
|
||||||
|
|
||||||
### Using docker
|
### Using docker
|
||||||
|
|
||||||
Requirements
|
Requirements
|
||||||
@ -53,7 +57,7 @@ options.ConfigurationOptions = new ConfigurationOptions
|
|||||||
|
|
||||||
Running the container
|
Running the container
|
||||||
1. Build the Dockerfile: `docker build -t clean-architecture .`
|
1. Build the Dockerfile: `docker build -t clean-architecture .`
|
||||||
2. Run the Container: `docker run -p 80:80 clean-architecture`
|
2. Run the Container: `docker run -p 80:80 -p 8080:8080 clean-architecture`
|
||||||
|
|
||||||
### Using docker-compose
|
### Using docker-compose
|
||||||
|
|
||||||
|
@ -6,9 +6,14 @@ spec:
|
|||||||
selector:
|
selector:
|
||||||
app: clean-architecture-app
|
app: clean-architecture-app
|
||||||
ports:
|
ports:
|
||||||
- protocol: TCP
|
- name: http
|
||||||
|
protocol: TCP
|
||||||
port: 80
|
port: 80
|
||||||
targetPort: 80
|
targetPort: 80
|
||||||
|
- name: grpc
|
||||||
|
protocol: TCP
|
||||||
|
port: 8080
|
||||||
|
targetPort: 8080
|
||||||
type: LoadBalancer
|
type: LoadBalancer
|
||||||
|
|
||||||
---
|
---
|
||||||
@ -32,6 +37,9 @@ spec:
|
|||||||
image: alexdev28/clean-architecture:latest
|
image: alexdev28/clean-architecture:latest
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 80
|
||||||
|
protocol: TCP
|
||||||
|
- containerPort: 8080
|
||||||
|
protocol: TCP
|
||||||
env:
|
env:
|
||||||
- name: ASPNETCORE_HTTP_PORTS
|
- name: ASPNETCORE_HTTP_PORTS
|
||||||
value: 80
|
value: 80
|
||||||
|
Loading…
Reference in New Issue
Block a user