mirror of
https://github.com/alex289/CleanArchitecture.git
synced 2025-06-29 18:21:08 +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.
|
||||
|
||||
## 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.
|
||||
2. Open the solution in your IDE of choice.
|
||||
3. Build the solution to restore the dependencies.
|
||||
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.
|
||||
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
|
||||
|
||||
Requirements
|
||||
@ -53,7 +57,7 @@ options.ConfigurationOptions = new ConfigurationOptions
|
||||
|
||||
Running the container
|
||||
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
|
||||
|
||||
|
@ -6,9 +6,14 @@ spec:
|
||||
selector:
|
||||
app: clean-architecture-app
|
||||
ports:
|
||||
- protocol: TCP
|
||||
- name: http
|
||||
protocol: TCP
|
||||
port: 80
|
||||
targetPort: 80
|
||||
- name: grpc
|
||||
protocol: TCP
|
||||
port: 8080
|
||||
targetPort: 8080
|
||||
type: LoadBalancer
|
||||
|
||||
---
|
||||
@ -32,6 +37,9 @@ spec:
|
||||
image: alexdev28/clean-architecture:latest
|
||||
ports:
|
||||
- containerPort: 80
|
||||
protocol: TCP
|
||||
- containerPort: 8080
|
||||
protocol: TCP
|
||||
env:
|
||||
- name: ASPNETCORE_HTTP_PORTS
|
||||
value: 80
|
||||
|
Loading…
Reference in New Issue
Block a user