You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This project demonstrates both client-side component rendering and hydration with Angular, as well as server-side rendering with Node.js and Socket.IO for real-time communication. It also includes Docker configurations for easy deployment.
5
+
This sample demonstrates how to deploy a full-stack Angular and Node.js application with Defang. It uses Socket.IO for real-time communication. The Docker setup ensures the app can be easily built and deployed.
6
6
7
-
## NOTE
7
+
## Prerequisites
8
8
9
-
This sample showcases how you could deploy a full-stack application with Angular and Node.js using Defang. The Docker setup ensures the app can be easily built and deployed.
For development, we use two local containers, one for the frontend Angular service and one for the backend service in Express. It also uses Caddy as a web server for serving static files.
2. (Optional) If you are using [Defang BYOC](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html) authenticated with your AWS account
15
-
3. (Optional for local development) [Docker CLI](https://docs.docker.com/engine/install/)
18
+
To run the application locally, you can use the following command:
2. (Optional) If you are using [Defang BYOC](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html) make sure you have properly authenticated your AWS account
Deploy your application to the Defang Playground by opening up your terminal and typing:
42
+
```bash
43
+
defang compose up
44
+
```
45
+
46
+
### BYOC (AWS)
31
47
32
-
For development, we use two local containers, one for the frontend Angular service and one for the backend service in Express. It also uses Caddy as a web server for serving static files. To run the sample locally after cloning the repository, you can run on Docker by doing:
48
+
If you want to deploy to your own cloud account, you can use Defang BYOC:
33
49
34
-
1.`docker compose -f compose.dev.yaml up --build`
50
+
1.[Authenticate your AWS account](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html), and check that you have properly set your environment variables like `AWS_PROFILE`, `AWS_REGION`, `AWS_ACCESS_KEY_ID`, and `AWS_SECRET_ACCESS_KEY`.
51
+
2. Run in a terminal that has access to your AWS environment variables:
52
+
```bash
53
+
defang --provider=aws compose up
54
+
```
35
55
36
56
---
37
57
@@ -41,4 +61,4 @@ Short Description: A full-stack application using Angular for the frontend and N
This sample project demonstrates how to deploy a BullMQ message queue on top of managed Redis with a queue processor and a dashboard to monitor the queue.
5
+
This sample demonstrates how to deploy a BullMQ message queue on top of managed Redis with a queue processor and a dashboard to monitor the queue.
6
6
7
-
Once your app is up and running you can go to the `/board` route for the `board` service to see the Bull Board dashboard and use the username `admin` and the password you set to log in (see [Deploying](#deploying)).
7
+
Once your app is up and running you can go to the `/board` route for the `board` service to see the Bull Board dashboard and use the username `admin` and the board password you set to log in (see [Configuration](#configuration)).
8
8
9
-
To add a job to the queue, you can go to the `/add` route of the `api` service. This will use some default values so you can test things out. You can also see an example of a post request in the [sample http request](./api/add.test.http) file.
9
+
To add a job to the queue, you can go to the `/add` route of the `api` service. This will use some default values so you can test things out. You can also see an example of a post request in the [sample HTTP request](./api/add.test.http) file.
10
10
11
11
The `worker` service is the queue processor that will process the jobs added to the queue. You can see in the `compose.yaml` file that the `worker` service is set to scale to 2 instances. This means that there will be 2 workers processing jobs from the queue. You can set this to your desired number of workers, but we wanted to show how you can increase the number of workers to handle more jobs.
2. (optional) If you are using <ahref="https://docs.defang.io/docs/concepts/defang-byoc">Defang BYOC</a>, make sure you have properly <ahref="https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html">authenticated your AWS account</a>.
2. (Optional) If you are using [Defang BYOC](https://docs.defang.io/docs/concepts/defang-byoc) authenticate with your cloud provider account
17
+
3. (Optional for local development) [Docker CLI](https://docs.docker.com/engine/install/)
17
18
18
-
## Deploying
19
+
## Development
19
20
20
-
1. Open the terminal and type `defang login`
21
-
2. Run `defang config set BOARD_PASSWORD` to set the password for the BullBoard dashboard.
22
-
3. Type `defang compose up` in the CLI.
23
-
4. Your app will be running within a few minutes.
21
+
To run the application locally, you can use the following command:
24
22
25
-
## Local Development
23
+
```bash
24
+
docker compose -f compose.dev.yaml up --build
25
+
```
26
26
27
-
1. Run `docker compose -f compose.dev.yaml up --build`
27
+
## Configuration
28
+
29
+
For this sample, you will need to provide the following [configuration](https://docs.defang.io/docs/concepts/configuration):
30
+
31
+
> Note that if you are using the 1-click deploy option, you can set these values as secrets in your GitHub repository and the action will automatically deploy them for you.
32
+
33
+
### `BOARD_PASSWORD`
34
+
Set a board password and use together with the board username `admin` when signing in.
Deploy your application to the Defang Playground by opening up your terminal and typing:
52
+
```bash
53
+
defang compose up
54
+
```
55
+
56
+
### BYOC (AWS)
57
+
58
+
If you want to deploy to your own cloud account, you can use Defang BYOC:
59
+
60
+
1.[Authenticate your AWS account](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html), and check that you have properly set your environment variables like `AWS_PROFILE`, `AWS_REGION`, `AWS_ACCESS_KEY_ID`, and `AWS_SECRET_ACCESS_KEY`.
61
+
2. Run in a terminal that has access to your AWS environment variables:
This project is a simple task manager application using ASP.NET Core. We show case how to deploy it to both Defang and Docker for both prod and dev environments.
5
+
This sample project is a simple task manager application using ASP.NET Core for the backend and JavaScript for client-side component rendering.
6
6
7
-
## NOTE
7
+
It showcases how you could deploy a full-stack application with ASP.NET Core and JavaScript using Defang. The Docker setup ensures the app can be easily built and tested during development.
8
8
9
-
This sample showcases how you could deploy a full-stack application with ASP.NET Core and JavaScript using Defang. The Docker setup ensures the app can be easily built and tested during development.
2. (Optional) If you are using [Defang BYOC](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html) authenticated with your AWS account
2. (Optional) If you are using [Defang BYOC](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html) make sure you have properly authenticated your AWS account
For development, we use two local containers, one for the frontend service and one for the backend service in ASP.NET Core. It also uses Caddy as a web server for serving static files.
22
19
23
-
## A Step-by-Step Guide for deployment
20
+
To run the application locally, you can use the following command:
24
21
25
-
1. Open the terminal and type `defang login`
26
-
2. Type `defang compose up` in the CLI
27
-
3. Your app should be up and running with Defang in minutes!
22
+
```bash
23
+
docker compose -f compose.dev.yaml up --build
24
+
```
25
+
## Configuration
28
26
29
-
## Development
27
+
For this sample, you will not need to provide [configuration](https://docs.defang.io/docs/concepts/configuration).
28
+
29
+
If you wish to provide configuration, see below for an example of setting a configuration for a value named `API_KEY`.
Deploy your application to the Defang Playground by opening up your terminal and typing:
43
+
```bash
44
+
defang compose up
45
+
```
46
+
47
+
### BYOC (AWS)
30
48
31
-
For development, we use two local containers, one for the frontend service and one for the backend service in ASP.NET Core. It also uses Caddy as a web server for serving static files. To run the sample locally after cloning the repository, you can run on Docker by doing:
49
+
If you want to deploy to your own cloud account, you can use Defang BYOC:
32
50
33
-
`docker compose -f compose.dev.yaml up --build`
51
+
1.[Authenticate your AWS account](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html), and check that you have properly set your environment variables like `AWS_PROFILE`, `AWS_REGION`, `AWS_ACCESS_KEY_ID`, and `AWS_SECRET_ACCESS_KEY`.
52
+
2. Run in a terminal that has access to your AWS environment variables:
53
+
```bash
54
+
defang --provider=aws compose up
55
+
```
34
56
35
57
---
36
58
37
59
Title: C# & ASP.NET Core
38
60
39
-
Short Description: A task manager using ASP.NET Core containerized with Docker.
61
+
Short Description: A simple task manager application using C# and ASP.NET Core.
0 commit comments