Skip to content

Commit e99bc6a

Browse files
smoke test ghcr - dochub - execute ci on tag push
1 parent 6e97807 commit e99bc6a

File tree

4 files changed

+162
-13
lines changed

4 files changed

+162
-13
lines changed

.github/workflows/docker-compose-ci.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
name: docker-compose-ci
22

33
on:
4-
#workflow_dispatch:
54
push:
6-
branches: ["master"]
7-
paths-ignore:
8-
- "**/*.md"
9-
- "**/*.png"
10-
- "**/*.jpg"
11-
- "**/*.svg"
5+
tags:
6+
- 'v[0-9]+.[0-9]+.[0-9]+' # v1.2.3
7+
#on:
8+
#workflow_dispatch:
9+
# push:
10+
# branches: ["master"]
11+
# paths-ignore:
12+
# - "**/*.md"
13+
# - "**/*.png"
14+
# - "**/*.jpg"
15+
# - "**/*.svg"
1216
#tags: ["v*.*.*"]
1317
#pull_request:
1418
#branches: ["master"]

.github/workflows/dotnet-tests.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@ name: .NET Tests (collector)
22

33
on:
44
push:
5-
branches: ["master" ]
6-
paths-ignore:
7-
- "**/*.md"
8-
- "**/*.png"
9-
- "**/*.jpg"
10-
- "**/*.svg"
5+
tags:
6+
- 'v[0-9]+.[0-9]+.[0-9]+' # v1.2.3
7+
# on:
8+
# push:
9+
# branches: ["master" ]
10+
# paths-ignore:
11+
# - "**/*.md"
12+
# - "**/*.png"
13+
# - "**/*.jpg"
14+
# - "**/*.svg"
1115
#pull_request:
1216
#branches: [ "main", "master" ]
1317
#workflow_dispatch: {}

docker-compose.dhub.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: centralized-logging-stack-dhub
2+
3+
services:
4+
api:
5+
# ── Docker Hub image
6+
image: docker.io/hasanjaveddeveloper/centralized-logging-api:latest
7+
container_name: centralized_logging_api
8+
environment:
9+
- ASPNETCORE_ENVIRONMENT=Production
10+
ports:
11+
- "5000:8080" # Map host:container for HTTP
12+
- "5001:8081" # Map host:container for HTTPS (if your app supports it)
13+
depends_on:
14+
db:
15+
condition: service_healthy
16+
volumes:
17+
- ./CentralizedLoggingApi/logs:/app/logs
18+
19+
userapi:
20+
image: docker.io/hasanjaveddeveloper/centralized-logging-userapi:latest
21+
container_name: user_management_api
22+
environment:
23+
- ASPNETCORE_ENVIRONMENT=Production
24+
ports:
25+
- "6000:8080" # Host 6000 -> container 8080 (HTTP)
26+
# - "6001:8081" # Optional HTTPS mapping if your app listens on 8081
27+
depends_on:
28+
db:
29+
condition: service_healthy
30+
volumes:
31+
- ./UserManagementApi/logs:/app/logs
32+
33+
web:
34+
image: docker.io/hasanjaveddeveloper/centralized-logging-web:latest
35+
container_name: api_integration_web
36+
environment:
37+
- ASPNETCORE_ENVIRONMENT=Production
38+
- ASPNETCORE_URLS=http://+:8080
39+
# Point the web app to APIs by service name (DNS provided by Compose)
40+
- Services__CentralizedLogging__BaseUrl=http://api:8080
41+
- Services__UserManagement__BaseUrl=http://userapi:8080
42+
ports:
43+
- "7000:8080" # browse http://localhost:7000
44+
depends_on:
45+
api:
46+
condition: service_started
47+
userapi:
48+
condition: service_started
49+
50+
db:
51+
image: mcr.microsoft.com/mssql/server:2022-latest
52+
container_name: centralized_logging_db
53+
environment:
54+
- ACCEPT_EULA=Y
55+
- SA_PASSWORD=Bisp@123
56+
ports:
57+
- "1433:1433"
58+
healthcheck:
59+
test: ["CMD-SHELL", "/opt/mssql-tools18/bin/sqlcmd -S localhost,1433 -U sa -P 'Bisp@123' -C -Q \"SELECT 1\""]
60+
interval: 10s
61+
timeout: 5s
62+
retries: 10
63+
start_period: 30s
64+
volumes:
65+
- sql_data:/var/opt/mssql
66+
67+
volumes:
68+
sql_data:

docker-compose.ghcr.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: centralized-logging-stack
2+
3+
services:
4+
api:
5+
image: ghcr.io/hasanjaved-developer/centralized-logging/api:latest
6+
container_name: centralized_logging_api
7+
environment:
8+
- ASPNETCORE_ENVIRONMENT=Production
9+
10+
ports:
11+
- "5000:8080" # Map host:container for HTTP
12+
- "5001:8081" # Map host:container for HTTPS (if your app supports it)
13+
depends_on:
14+
db:
15+
condition: service_healthy
16+
volumes:
17+
- ./CentralizedLoggingApi/logs:/app/logs
18+
19+
userapi:
20+
image: ghcr.io/hasanjaved-developer/centralized-logging/userapi:latest
21+
22+
container_name: user_management_api
23+
environment:
24+
- ASPNETCORE_ENVIRONMENT=Production
25+
26+
ports:
27+
- "6000:8080" # Host 6000 -> container 8080 (HTTP)
28+
# - "6001:8081" # Optional HTTPS mapping if your app listens on 8081
29+
depends_on:
30+
db:
31+
condition: service_healthy
32+
volumes:
33+
- ./UserManagementApi/logs:/app/logs
34+
35+
web:
36+
37+
image: ghcr.io/hasanjaved-developer/centralized-logging/web:latest
38+
container_name: api_integration_web
39+
environment:
40+
- ASPNETCORE_ENVIRONMENT=Production
41+
- ASPNETCORE_URLS=http://+:8080
42+
# Point the web app to APIs by service name (DNS provided by Compose)
43+
- Services__CentralizedLogging__BaseUrl=http://api:8080
44+
- Services__UserManagement__BaseUrl=http://userapi:8080
45+
ports:
46+
- "7000:8080" # browse http://localhost:7000
47+
depends_on:
48+
api:
49+
condition: service_started
50+
userapi:
51+
condition: service_started
52+
53+
db:
54+
image: mcr.microsoft.com/mssql/server:2022-latest
55+
container_name: centralized_logging_db
56+
environment:
57+
- ACCEPT_EULA=Y
58+
- SA_PASSWORD=Bisp@123
59+
60+
ports:
61+
- "1433:1433"
62+
63+
healthcheck:
64+
test: ["CMD-SHELL", "/opt/mssql-tools18/bin/sqlcmd -S localhost,1433 -U sa -P 'Bisp@123' -C -Q \"SELECT 1\""]
65+
interval: 10s
66+
timeout: 5s
67+
retries: 10
68+
start_period: 30s
69+
volumes:
70+
- sql_data:/var/opt/mssql
71+
72+
volumes:
73+
sql_data:

0 commit comments

Comments
 (0)