File tree 4 files changed +68
-37
lines changed
4 files changed +68
-37
lines changed Original file line number Diff line number Diff line change 79
79
fail_ci_if_error : true
80
80
verbose : true
81
81
82
- deploy :
82
+ build and push to DockerHub :
83
83
needs : [build, test]
84
84
runs-on : ubuntu-latest
85
85
steps :
98
98
context : .
99
99
file : ./Forums/Dockerfile
100
100
push : true
101
- tags : ${{ secrets.DOCKER_HUB_USERNAME }}/forums:latest
101
+ tags : ${{ secrets.DOCKER_HUB_USERNAME }}/forums:latest
102
+
103
+ deploy to minikube :
104
+ needs : [build and test to DockerHub]
105
+ runs-on : ubuntu-latest
106
+ name : build example and deploy to minikube
107
+ steps :
108
+ - uses : actions/checkout@v2
109
+ - name : Start minikube
110
+ uses : medyagh/setup-minikube@master
111
+ - name : Try the cluster !
112
+ run : kubectl get pods -A
113
+ - name : Build image
114
+ run : |
115
+ export SHELL=/bin/bash
116
+ eval $(minikube -p minikube docker-env)
117
+ docker build -f ./Forums/Dockerfile -t markgoertz/forums .
118
+ echo -n "verifying images:"
119
+ docker images
120
+ - name : Deploy to minikube
121
+ run :
122
+ kubectl apply -f deploy-to-minikube.yaml
123
+ - name : Test service URLs
124
+ run : |
125
+ minikube service list
126
+ minikube service example --url
127
+ echo "------------------opening the service------------------"
128
+ curl $(minikube service example --url)
Original file line number Diff line number Diff line change 5
5
using Microsoft . EntityFrameworkCore ;
6
6
using CommandsMediatR = ForumsService . Application . Command ;
7
7
using QueriesMediatR = ForumsService . Application . Query ;
8
- using ForumsService . Application . Consumer ;
9
- using ForumsService . Application . Worker ;
10
8
using MassTransit ;
11
- using Microsoft . Extensions . Configuration ;
12
9
using Forums . Models ;
13
- using System . Diagnostics ;
14
10
using FeedMessages . Application . Notifications ;
15
11
16
12
var builder = WebApplication . CreateBuilder ( args ) ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ apiVersion : apps/v1
2
+ kind : Deployment
3
+ metadata :
4
+ name : forums
5
+ spec :
6
+ selector :
7
+ matchLabels :
8
+ app : forums
9
+ replicas : 2
10
+ template :
11
+ metadata :
12
+ labels :
13
+ app : forums
14
+ spec :
15
+ containers :
16
+ - name : forums-api
17
+ imagePullPolicy : Never
18
+ image : local/forums:latest
19
+ resources :
20
+ limits :
21
+ cpu : 50m
22
+ memory : 100Mi
23
+ requests :
24
+ cpu : 25m
25
+ memory : 10Mi
26
+ ports :
27
+ - containerPort : 7070
28
+ ---
29
+ apiVersion : v1
30
+ kind : Service
31
+ metadata :
32
+ name : forums
33
+ spec :
34
+ type : NodePort
35
+ selector :
36
+ app : forums
37
+ ports :
38
+ - port : 7070
39
+ targetPort : 7070
You can’t perform that action at this time.
0 commit comments