Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions content/guides/dotnet/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ spec:
name: server
imagePullPolicy: Always
ports:
- containerPort: 80
- containerPort: 8080
hostPort: 8080
protocol: TCP
resources: {}
Expand Down Expand Up @@ -117,7 +117,7 @@ spec:
ports:
- name: "8080"
port: 8080
targetPort: 80
targetPort: 8080
nodePort: 30001
selector:
service: server
Expand Down
13 changes: 6 additions & 7 deletions content/guides/dotnet/develop.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ $ docker container ls
You should see output like the following.

```console
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
cb36e310aa7e docker-dotnet-server "dotnet myWebApp.dll" About a minute ago Up About a minute 0.0.0.0:8080->80/tcp docker-dotnet-server-1
39fdcf0aff7b postgres "docker-entrypoint.s…" About a minute ago Up About a minute (healthy) 5432/tcp docker-dotnet-db-1
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
cb36e310aa7e docker-dotnet-server "dotnet myWebApp.dll" About a minute ago Up About a minute 0.0.0.0:8080->8080/tcp docker-dotnet-server-1
39fdcf0aff7b postgres "docker-entrypoint.s…" About a minute ago Up About a minute (healthy) 5432/tcp docker-dotnet-db-1
```

In the previous example, the container ID is `39fdcf0aff7b`. Run the following command to connect to the postgres database in the container. Replace the container ID with your own container ID.
Expand Down Expand Up @@ -241,7 +241,7 @@ services:
context: .
target: final
ports:
- 8080:80
- 8080:8080
depends_on:
db:
condition: service_healthy
Expand Down Expand Up @@ -337,14 +337,14 @@ ENTRYPOINT ["dotnet", "myWebApp.dll"]

The following is the updated `compose.yaml` file.

```yaml {hl_lines="5"}
```yaml {hl_lines=[5,15,16]}
services:
server:
build:
context: .
target: development
ports:
- 8080:80
- 8080:8080
depends_on:
db:
condition: service_healthy
Expand All @@ -354,7 +354,6 @@ services:
path: .
environment:
- ASPNETCORE_ENVIRONMENT=Development
- ASPNETCORE_URLS=http://+:80'
db:
image: postgres
restart: always
Expand Down