Skip to content

Instantly share code, notes, and snippets.

View mauricio-testa's full-sized avatar
💻
Working...

Mauricio Testa mauricio-testa

💻
Working...
View GitHub Profile

Como fazer deploy no Kubernetes de produção

Pré requisitos:

  • É necessário ter acesso aos namespaces no Rancher de produção e fazer o download do kubeconfig de produção. Para este exemplo, o kubeconfig de produção foi baixado e está localizado em C:/Users/iciot/.kube/kubeprod
  • Entender o básico de versionamento semântico

Passo a passo:

  1. Definir qual vai ser a tag da nova versão. Para isso, é necessário observar no Rancher qual é a versão atual do deployment

Exemplo: digamos vamos fazer o deploy de uma correção de bug no socialproof. Observando no rancher, vemos que a versão atual é v1.2.0 https://prnt.sc/To6w6BebBC3e. Logo, baseado no versionamento semântico a nova versão será a v1.2.1

@mauricio-testa
mauricio-testa / json2sql.html
Last active February 20, 2024 19:46
Transform a json array into SQL insert commands
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<textarea name="output" id="output" readonly rows="100" style="width: 100%;"></textarea>
</body>

How to run Laravel websockets in Kubernetes

This document describes the configurations for deploying a Websocket service on Kubernetes built with Laravel 7 that uses the pusher/pusher-php-server, beyondcode/laravel-websockets, laravel-echo and pusher-js libraries

1. Create a deployment for whe websocket service

This deployment and service will run the artisan websockets:serve command and the websocket will be served on default port 6001

apiVersion: apps/v1

3 abordages

Font icons

Prós

  • Código enxuto
  • Fácil personalização com CSS
  • Carrega todos os ícones
<template>
<div class="todoapp">
<div class="container">
<h1>Todo Vue JS</h1>
<nav class="filters">
<ul>
<li class="active"><a>All</a></li>
<li><a>Completed</a></li>
<li><a>Pending</a></li>
</ul>
@mauricio-testa
mauricio-testa / html-table-to-spreadsheet.js
Last active June 25, 2022 18:44
htmlTable2Spreadsheet
/**
* Convert an html table to a spreadsheet and download it
*
* @param {String} selector - Selector of table
* @param {String} format - xls or csv
*
* Usage
* htmlTable2Spreadsheet('.table', 'xls').download()
*/