mirror of
https://github.com/marcel-dempers/docker-development-youtube-series.git
synced 2025-06-06 17:01:30 +00:00
app build + deploy
This commit is contained in:
parent
3d563ad550
commit
d384353ef9
@ -167,10 +167,10 @@ We should now be able to access the dashboard on `http://localhost:8888`
|
|||||||
## Targets
|
## Targets
|
||||||
|
|
||||||
```
|
```
|
||||||
# add a route for shipa API
|
# add a route for NGINX
|
||||||
route add 10.100.10.10/32 MASK 255.255.255.255 $(minikube ip)
|
route add 10.100.10.10/32 MASK 255.255.255.255 $(minikube ip)
|
||||||
|
|
||||||
# add a route for shipa ingress
|
# add a route for Traefik
|
||||||
route add 10.100.10.20/32 MASK 255.255.255.255 $(minikube ip)
|
route add 10.100.10.20/32 MASK 255.255.255.255 $(minikube ip)
|
||||||
|
|
||||||
shipa target-add dev 10.100.10.10
|
shipa target-add dev 10.100.10.10
|
||||||
@ -204,9 +204,15 @@ shipa cluster-list
|
|||||||
|
|
||||||
```
|
```
|
||||||
shipa login
|
shipa login
|
||||||
shipa app-create helloworld static -t admin -o theonepool
|
shipa app-create go-helloworld static -t admin -o theonepool
|
||||||
|
|
||||||
shipa app-deploy -i aimvector/python:1.0.4 -a helloworld
|
|
||||||
|
cd kubernetes\shipa\developers
|
||||||
|
|
||||||
|
docker build aimvector/shipa-golang:v1
|
||||||
|
docker push aimvector/shipa-golang:v1
|
||||||
|
|
||||||
|
shipa app-deploy -i aimvector/shipa-golang:v1 -a go-helloworld
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
6
kubernetes/shipa/developers/dockerfile
Normal file
6
kubernetes/shipa/developers/dockerfile
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
FROM golang
|
||||||
|
RUN mkdir /app
|
||||||
|
WORKDIR /app
|
||||||
|
ADD . /app/
|
||||||
|
RUN go build .
|
||||||
|
ENTRYPOINT ./app
|
20
kubernetes/shipa/developers/main.go
Normal file
20
kubernetes/shipa/developers/main.go
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"net/http"
|
||||||
|
"os"
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
http.HandleFunc("/", hello)
|
||||||
|
fmt.Println("hello world")
|
||||||
|
err := http.ListenAndServe(":" + os.Getenv("PORT"), nil)
|
||||||
|
if err != nil {
|
||||||
|
panic(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func hello(res http.ResponseWriter, req *http.Request) {
|
||||||
|
fmt.Fprintln(res, "Hello World! from Golang on Shipa")
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user