Skip to content

Commit

Permalink
feat: Extend documentation for aspire
Browse files Browse the repository at this point in the history
  • Loading branch information
alex289 committed Nov 21, 2024
1 parent 7a166d1 commit 189b900
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
10 changes: 7 additions & 3 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
10 changes: 9 additions & 1 deletion k8s-deployments/clean-architecture.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

---
Expand All @@ -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
Expand Down

0 comments on commit 189b900

Please sign in to comment.