File tree Expand file tree Collapse file tree 5 files changed +14
-7
lines changed Expand file tree Collapse file tree 5 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ services:
1515 image : aimvector/golang:1.0.0
1616 build :
1717 context : ./golang
18- target : debug
18+ target : prod
1919 volumes :
2020 - ./golang/src/:/go/src/work/
2121 ports :
Original file line number Diff line number Diff line change @@ -11,12 +11,17 @@ import (
1111func Response (ctx * fasthttp.RequestCtx ) {
1212 fmt .Fprintf (ctx , "Hello" )
1313}
14+
15+ func Status (ctx * fasthttp.RequestCtx ) {
16+ fmt .Fprintf (ctx , "ok" )
17+ }
1418func main () {
1519
1620 fmt .Println ("starting..." )
1721
1822 router := fasthttprouter .New ()
1923 router .GET ("/" , Response )
24+ router .GET ("/status" , Status )
2025
2126 log .Fatal (fasthttp .ListenAndServe (":5000" , router .Handler ))
2227}
Original file line number Diff line number Diff line change @@ -12,18 +12,16 @@ spec:
1212 labels :
1313 app : example-app
1414 spec :
15- imagePullSecrets :
16- - name : " docker-registry"
1715 containers :
1816 - name : example-app
19- image : aimvector/example-app
17+ image : aimvector/golang:1.0.0
2018 imagePullPolicy : Always
2119 ports :
22- - containerPort : 80
20+ - containerPort : 5000
2321 livenessProbe :
2422 httpGet :
2523 path : /status
26- port : 80
24+ port : 5000
2725 initialDelaySeconds : 3
2826 periodSeconds : 3
2927 resources :
Original file line number Diff line number Diff line change @@ -23,4 +23,6 @@ docker-compose build nodejs
2323# aimvector/python:1.0.0
2424docker-compose build python
2525
26- ```
26+ ```
27+
28+ Take a look at example [ deployment yaml] ( ./deployment.yaml )
Original file line number Diff line number Diff line change 55Checkout [ kubectl] ( ./kubectl.md ) for detailed steps
66
77## Deployments
8+
9+ Checkout [ deployments] ( ./deployments/readme.md ) for detailed steps
You can’t perform that action at this time.
0 commit comments