mirror of
https://github.com/marcel-dempers/docker-development-youtube-series.git
synced 2025-06-06 17:01:30 +00:00
updates to kubernetes deployments
This commit is contained in:
parent
a8664272e9
commit
20011946e7
@ -15,7 +15,7 @@ services:
|
||||
image: aimvector/golang:1.0.0
|
||||
build:
|
||||
context: ./golang
|
||||
target: debug
|
||||
target: prod
|
||||
volumes:
|
||||
- ./golang/src/:/go/src/work/
|
||||
ports:
|
||||
|
@ -11,12 +11,17 @@ import (
|
||||
func Response(ctx *fasthttp.RequestCtx) {
|
||||
fmt.Fprintf(ctx, "Hello")
|
||||
}
|
||||
|
||||
func Status(ctx *fasthttp.RequestCtx) {
|
||||
fmt.Fprintf(ctx, "ok")
|
||||
}
|
||||
func main() {
|
||||
|
||||
fmt.Println("starting...")
|
||||
|
||||
router := fasthttprouter.New()
|
||||
router.GET("/", Response)
|
||||
router.GET("/status", Status)
|
||||
|
||||
log.Fatal(fasthttp.ListenAndServe(":5000", router.Handler))
|
||||
}
|
@ -12,18 +12,16 @@ spec:
|
||||
labels:
|
||||
app: example-app
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: "docker-registry"
|
||||
containers:
|
||||
- name: example-app
|
||||
image: aimvector/example-app
|
||||
image: aimvector/golang:1.0.0
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 80
|
||||
- containerPort: 5000
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /status
|
||||
port: 80
|
||||
port: 5000
|
||||
initialDelaySeconds: 3
|
||||
periodSeconds: 3
|
||||
resources:
|
||||
|
@ -24,3 +24,5 @@ docker-compose build nodejs
|
||||
docker-compose build python
|
||||
|
||||
```
|
||||
|
||||
Take a look at example [deployment yaml](./deployment.yaml)
|
@ -5,3 +5,5 @@
|
||||
Checkout [kubectl](./kubectl.md) for detailed steps
|
||||
|
||||
## Deployments
|
||||
|
||||
Checkout [deployments](./deployments/readme.md) for detailed steps
|
Loading…
x
Reference in New Issue
Block a user