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
Copy file name to clipboardExpand all lines: readme.md
+9-58Lines changed: 9 additions & 58 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,14 @@
1
-
# .NET and Redis on Azure Container Apps
1
+
# .NET on Codespaces
2
2
3
-
This sample will show you how to create a multi-container app topology in [Azure Container Apps](https://learn.microsoft.com/en-us/azure/container-apps/) using the [Azure Developer CLI](https://aka.ms/azd/install). Here's a 5-minute video that walks you through a demo of using the repo to set it up yourself.
3
+
Copy for Claudia to write
4
4
5
-
[](https://www.youtube.com/embed/ob8c2pQVw7c)
6
-
7
-
[](https://codespaces.new/bradygaster/dotnet-redis-pubsub)
8
-
[](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/bradygaster/dotnet-redis-pubsub)
5
+
[](https://codespaces.new/bradygaster/dotnet-codespace)
6
+
[](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/bradygaster/dotnet-codespace)
9
7
10
8
## Getting started
11
9
12
-
1.**📤 One-click setup**: [Open a new Codespace](https://codespaces.new/bradygaster/dotnet-redis-pubsub), giving you a fully configured cloud developer environment.
13
-
3.**▶️ Run, one-click again**: Use VS Code's built-in *Run* command and open the forwarded port*8080* in your browser.
10
+
1.**📤 One-click setup**: [Open a new Codespace](https://codespaces.new/bradygaster/dotnet-codespace), giving you a fully configured cloud developer environment.
11
+
3.**▶️ Run, one-click again**: Use VS Code's built-in *Run* command and open the forwarded ports*8080* and *8081* in your browser.
14
12
5.**🔄 Iterate quickly:** Codespaces updates the server on each save, and VS Code's debugger lets you dig into the code execution.
15
13
16
14
## Run
@@ -21,67 +19,20 @@ This repository can be run in Codespaces, in Dev Containers, or locally on your
21
19
22
20
1. Click here to open in GitHub Codespaces
23
21
24
-
[](https://codespaces.new/bradygaster/dotnet-redis-pubsub)
22
+
[](https://codespaces.new/bradygaster/dotnet-codespace)
25
23
26
24
### Run in Dev Container
27
25
28
26
1. Click here to open in Dev Container
29
27
30
-
[](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/bradygaster/dotnet-redis-pubsub)
28
+
[](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/bradygaster/dotnet-codespace)
31
29
32
30
33
31
### Run Locally
34
32
35
-
1. Clone the repo to your local machine `git clone https://github.com/bradygaster/dotnet-redis-pubsub`
33
+
1. Clone the repo to your local machine `git clone https://github.com/bradygaster/dotnet-codespace`
36
34
1. Open repo in VS Code
37
35
38
-
## Then...
39
-
40
-
1. Open the `docker-compose.yml` file
41
-
1. Right-click anywhere in the file and select **Docker Compose - Up**
42
-
1. Switch to the Docker extension to see the containers start up
43
-
1. Right-click the `publisher` container and select the `Open in Browser` menu item
44
-
1. You should see `Publisher is up` in your browser
45
-
1. Add the URL slug `/swagger` to the end of the URL in your browser to open the Swagger UI test page
46
-
1. Open the `POST` method, and replace the JSON body in the test window with this:
47
-
48
-
```json
49
-
{
50
-
"date": "2023-06-10T04:52:16.323Z",
51
-
"temperatureC": 30,
52
-
"summary": "Hot"
53
-
}
54
-
```
55
-
1. Right-click the `subscriber` container in the Docker containers pane, and select `View logs`
56
-
1. The logs should open up in your terminal window, and you should see evidence that the `subscriber` is receiving messages from the Redis subscription:
57
-
58
-
```
59
-
info: Microsoft.Hosting.Lifetime[0]
60
-
Application started. Press Ctrl+C to shut down.
61
-
info: Microsoft.Hosting.Lifetime[0]
62
-
Hosting environment: Production
63
-
info: Microsoft.Hosting.Lifetime[0]
64
-
Content root path: /app
65
-
info: Program[0]
66
-
Message received from test-channel : Hot (85) at 06/10/2023 04:52:16
67
-
info: Program[0]
68
-
Message received from test-channel : Hot (85) at 06/10/2023 04:52:16
69
-
```
70
-
71
-
1. Send a few more messages using the Swagger UI tool whilst viewing the subscriber's logs in the editor
72
-
73
-
## Deploy to Azure
74
-
75
-
You can deploy the app to Azure using the Azure Developer CLI, from any of the environments above.
76
-
77
-
> NOTE: If you are running locally, then you first need to [install the Azure Developer CLI](https://aka.ms/azd/install)
78
-
79
-
### Deploy with Azure Developer CLI
80
-
81
-
1. Open a terminal
82
-
1. Run `azd auth login`
83
-
1. Run `azd up`
84
-
85
36
## Contributing
86
37
87
38
This project welcomes contributions and suggestions. Most contributions require you to agree to a
0 commit comments