This file contains hidden or 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
# docker-compose.yml | |
# aqui especificamos que iremos utilizar a versão 3 da sintaxe do docker-compose | |
version: '3' | |
# em services declaramos os serviços que iremos "rodar" para desenvolver nossa aplicação | |
services: | |
# aqui declaramos nossa aplicação em sí | |
app: | |
stdin_open: true | |
tty: true | |
build: . # utilizamos o build para o docker-compose fazer o build da nossa imagem |
This file contains hidden or 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
# Dockerfile | |
# a instrução FROM serve para indicar em qual imagem a nossa vai ser baseada | |
FROM ruby:2.7-alpine | |
# a instrução ENV serve para definir variáveis de ambiente na nossa imagem. | |
# Essas variáveis podem ser alteradas na hora de executar a imagem | |
ENV RAILS_ENV=production | |
ENV PORT 3000 |
This file contains hidden or 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
apiVersion: v1 | |
kind: Secret | |
metadata: | |
name: cloudflare-api-key | |
namespace: gitlab-managed-apps | |
type: Opaque | |
data: | |
apikey: [your_api_key] | |
apiVersion: certmanager.k8s.io/v1alpha2 | |
kind: ClusterIssuer |
This file contains hidden or 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
export TILLER_NAMESPACE="gitlab-managed-apps" | |
kubectl get secrets/tiller-secret -n "$TILLER_NAMESPACE" -o "jsonpath={.data['ca\.crt']}" | base64 -d > tiller-ca.crt | |
kubectl get secrets/tiller-secret -n "$TILLER_NAMESPACE" -o "jsonpath={.data['tls\.crt']}" | base64 -d > tiller.crt | |
kubectl get secrets/tiller-secret -n "$TILLER_NAMESPACE" -o "jsonpath={.data['tls\.key']}" | base64 -d > tiller.key | |
helm list --tiller-connection-timeout 30 --tls --tls-ca-cert tiller-ca.crt --tls-cert tiller.crt --tls-key tiller.key --all --tiller-namespace gitlab-managed-apps | |
This file contains hidden or 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
package main | |
import ( | |
"net/http" | |
) | |
// Função que inicializa nossa aplicação | |
func main() { | |
// Cria um novo router utilizando a biblioteca padrão | |
router := http.NewServeMux() |
This file contains hidden or 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
var Robot = function(robot){ | |
robot.turnLeft(robot.angle % 90); | |
}; | |
Robot.prototype.onIdle = function(ev) { | |
var robot = ev.robot; | |
if (robot.parentId) { | |
robot.ahead(1); | |
robot.turnGunRight(1); | |
} | |
else { |