my-geektime

module
v0.0.0-...-6ea431b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2023 License: MIT

README

Using minikube for k8s if you are using a virtual environment:

  1. In a seperate terminal run minikube start
  2. Under the webook directory, run make docker
    This will rebuild the webook-app binary and subsequently use it to build the docker image xjiang91/webook, version v0.0.1. Modify the image prefix in the Dockerfile if needed.
  3. run docker tag $(docker images xjiang91/webook -q) xjiang91/webook:v0.0.1 && docker push xjiang91/webook:v0.0.1
    This will tage the image as xjiang91/webook:v0.0.1 and push to docker hub.
  4. Run the following commands to start the k8s service:
    chmod 700 k8s.sh && ./k8s.sh

There are two ways to access the services:

  1. To access a service (e.g.webook) via nodePort, run in terminal minikube service webook --url, and grab the address and go to the brower to visit it, e.g. http://192.168.76.2:32225/hello.
    Similary, you can access the mysql service by minikube service webook-mysql --url, and the redis service by minikube service webook-redis --url. You can then use the IP address and port to login.
  2. If the service type is LoadBalancer, you can also open a tunnel to the minikube cluster by running in a seperate terminal: minikube tunnel and keep that terminal alive, then use kubectl get services to check the EXTERNAL-IP and port.

For more details about minikube, please refer to the official documentation: https://minikube.sigs.k8s.io/docs/handbook/

Directories

Path Synopsis
internal/repository/article/mocks
Code generated by MockGen.
Code generated by MockGen.
internal/repository/cache/mocks
Code generated by MockGen.
Code generated by MockGen.
internal/repository/cache/redismocks
Code generated by MockGen.
Code generated by MockGen.
internal/repository/dao/article/mocks
Code generated by MockGen.
Code generated by MockGen.
internal/repository/dao/mocks
Code generated by MockGen.
Code generated by MockGen.
internal/repository/mocks
Code generated by MockGen.
Code generated by MockGen.
internal/service/mocks
Code generated by MockGen.
Code generated by MockGen.
internal/service/oauth2/wechat/mocks
Code generated by MockGen.
Code generated by MockGen.
internal/service/sms/cloopen
Package cloopen 容联云短信的实现 SDK文档:https://doc.yuntongxun.com/pe/5f029a06a80948a1006e7760
Package cloopen 容联云短信的实现 SDK文档:https://doc.yuntongxun.com/pe/5f029a06a80948a1006e7760
internal/service/sms/mocks
Code generated by MockGen.
Code generated by MockGen.
internal/web/jwt/mocks
Code generated by MockGen.
Code generated by MockGen.
ioc
pkg/ratelimit/mocks
Code generated by MockGen.
Code generated by MockGen.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL