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
|
image: aimvector/golang:1.0.0
|
||||||
build:
|
build:
|
||||||
context: ./golang
|
context: ./golang
|
||||||
target: debug
|
target: prod
|
||||||
volumes:
|
volumes:
|
||||||
- ./golang/src/:/go/src/work/
|
- ./golang/src/:/go/src/work/
|
||||||
ports:
|
ports:
|
||||||
|
@ -11,12 +11,17 @@ import (
|
|||||||
func Response(ctx *fasthttp.RequestCtx) {
|
func Response(ctx *fasthttp.RequestCtx) {
|
||||||
fmt.Fprintf(ctx, "Hello")
|
fmt.Fprintf(ctx, "Hello")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Status(ctx *fasthttp.RequestCtx) {
|
||||||
|
fmt.Fprintf(ctx, "ok")
|
||||||
|
}
|
||||||
func main() {
|
func main() {
|
||||||
|
|
||||||
fmt.Println("starting...")
|
fmt.Println("starting...")
|
||||||
|
|
||||||
router := fasthttprouter.New()
|
router := fasthttprouter.New()
|
||||||
router.GET("/", Response)
|
router.GET("/", Response)
|
||||||
|
router.GET("/status", Status)
|
||||||
|
|
||||||
log.Fatal(fasthttp.ListenAndServe(":5000", router.Handler))
|
log.Fatal(fasthttp.ListenAndServe(":5000", router.Handler))
|
||||||
}
|
}
|
@ -12,18 +12,16 @@ spec:
|
|||||||
labels:
|
labels:
|
||||||
app: example-app
|
app: example-app
|
||||||
spec:
|
spec:
|
||||||
imagePullSecrets:
|
|
||||||
- name: "docker-registry"
|
|
||||||
containers:
|
containers:
|
||||||
- name: example-app
|
- name: example-app
|
||||||
image: aimvector/example-app
|
image: aimvector/golang:1.0.0
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 80
|
- containerPort: 5000
|
||||||
livenessProbe:
|
livenessProbe:
|
||||||
httpGet:
|
httpGet:
|
||||||
path: /status
|
path: /status
|
||||||
port: 80
|
port: 5000
|
||||||
initialDelaySeconds: 3
|
initialDelaySeconds: 3
|
||||||
periodSeconds: 3
|
periodSeconds: 3
|
||||||
resources:
|
resources:
|
||||||
|
@ -23,4 +23,6 @@ docker-compose build nodejs
|
|||||||
# aimvector/python:1.0.0
|
# aimvector/python:1.0.0
|
||||||
docker-compose build python
|
docker-compose build python
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Take a look at example [deployment yaml](./deployment.yaml)
|
@ -5,3 +5,5 @@
|
|||||||
Checkout [kubectl](./kubectl.md) for detailed steps
|
Checkout [kubectl](./kubectl.md) for detailed steps
|
||||||
|
|
||||||
## Deployments
|
## Deployments
|
||||||
|
|
||||||
|
Checkout [deployments](./deployments/readme.md) for detailed steps
|
Loading…
x
Reference in New Issue
Block a user