Skip to content

Commit cf42387

Browse files
committed
⭐ Update GA for Docker Compose
1 parent b90c511 commit cf42387

File tree

3 files changed

+49
-4
lines changed

3 files changed

+49
-4
lines changed

.github/workflows/container.yml

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,27 @@ jobs:
2626
username: ${{ github.actor }}
2727
password: ${{ secrets.GITHUB_TOKEN }}
2828

29-
- name: Build the Docker image
30-
run: |
31-
docker build . --tag ghcr.io/ntxinh/aspnetcore-ddd:latest
32-
docker push ghcr.io/ntxinh/aspnetcore-ddd:latest
29+
# Method 1
30+
# -
31+
# name: Docker Build and Push
32+
# continue-on-error: true
33+
# run: |
34+
# docker build . --tag ghcr.io/ntxinh/aspnetcore-ddd:latest
35+
# docker push ghcr.io/ntxinh/aspnetcore-ddd:latest
36+
37+
# Method 2
38+
-
39+
name: Docker Build and Push by Action
40+
# continue-on-error: true
41+
uses: docker/build-push-action@v5
42+
with:
43+
push: true
44+
tags: ghcr.io/ntxinh/aspnetcore-ddd:latest
45+
46+
# Method 3:
47+
# -
48+
# name: Docker Build and Push by Docker Compose
49+
# continue-on-error: true
50+
# run: |
51+
# docker compose build
52+
# docker compose push

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,14 @@ docker run -d -p 3000:80 --name aspnetcore-docker-container aspnetcore-docker-im
8585

8686
- http://localhost:3000/
8787

88+
```bash
89+
docker compose up -d
90+
docker compose ps
91+
docker compose stop
92+
```
93+
94+
- http://localhost:80/
95+
8896
# Podman
8997

9098
```bash
@@ -95,6 +103,14 @@ podman run -d -p 3000:80 --name aspnetcore-docker-container aspnetcore-docker-im
95103

96104
- http://localhost:3000/
97105

106+
```bash
107+
podman-compose up -d
108+
podman-compose ps
109+
podman-compose stop
110+
```
111+
112+
- http://localhost:80/
113+
98114
# Swagger (Dev env only)
99115
- http://localhost:5000/swagger
100116

docker-compose.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
services:
2+
web:
3+
image: ghcr.io/ntxinh/aspnetcore-ddd:latest
4+
build: .
5+
ports:
6+
- "80:80"
7+
- "443:443"
8+
# environment:
9+
# ASPNETCORE_ENVIRONMENT: ${MyEnv}

0 commit comments

Comments
 (0)