This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .github/workflows/tests.yml | |
name: Tests | |
on: [pull_request] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# parar todos os containers | |
docker stop $(docker ps -a -q) | |
# remover todos os containers | |
docker rm -f $(docker ps -a -q) | |
# remover todas as imagens | |
docker rmi -f $(docker images -a -q) | |
# remover todos os containers e imagens |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# delete branch local | |
git branch -d the_local_branch | |
# delete branch remota | |
git push origin :the_remote_branch | |
git push origin --delete the_remote_branch | |
# atualizar referências dos branches local com remote | |
git fetch --prune --all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
k get pods -n <NAMESPACE_NAME> | |
# RECURSOS | |
k top pod <POD_NAME> -n <NAMESPACE_NAME> --containers | |
k top pod -n <NAMESPACE_NAME> | |
# LOG | |
k logs <POD_NAME> -n <NAMESPACE_NAME> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// inicia o Minikube | |
minikube start | |
// iniciar o Minikube com uma versão especifica do Kubernetes | |
minikube start --kubernetes-version="v1.16" | |
// acessar o dashboard do Kubernetes em execução | |
minikube dashboard | |
// status do Minikube |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kubectl version --client | |
kubectl config get-contexts | |
kubectl config use-context minikube | |
kubectl create -f <yaml> | |
kubectl get <pod | deployment> | |
kubectl describe pods |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Remove Flags | |
FROM golang:1.14.4-alpine AS builder | |
WORKDIR /go/src/github.com/seu-repo/api/ | |
COPY . . | |
RUN CGO_ENABLED=0 GOOS=linux \ | |
go build -a -installsuffix cgo -ldflags="-s -w" -o web_api ./main.go |