Skip to content

Instantly share code, notes, and snippets.

View maxarouca's full-sized avatar

Max Arouca maxarouca

View GitHub Profile
@maxarouca
maxarouca / tutorial.md
Last active September 22, 2018 18:59
Redux Saga

REDUX SAGA

INSTALANDO AS DEPENDÊNCIAS

yarn add redux react-redux redux-saga reduxsauce redux-devtools-extension axios

CRIAÇÃO DOS ARQUIVOS E PASTAS DO REDUX COM REDUXSAUCE

@maxarouca
maxarouca / index.html
Created September 27, 2018 14:18 — forked from mtmr0x/index.html
Botão animado - CSS Meetup
<!DOCTYPE html>
<html>
<head>
<style>
.btn {
will-change: transform;
border-radius: 3px;
transition: all .1s ease-in-out;
height: 29px;
padding: 8px 32px;
@maxarouca
maxarouca / dokku.md
Created March 12, 2019 14:37 — forked from chemicalkosek/dokku.md
Dokku

Dokku

Creating dokku app

Create the application on the Dokku host. You will need to ssh onto the host to run this command.

 # on the Dokku host
 dokku apps:create my-app-name

Deploy the app

Now you can deploy the my-app-name app to your Dokku server. All you have to do is add a remote to name the app. Applications are created on-the-fly on the Dokku server.

Welcome
#Deplyoing to Production
## Deployment using dokku (docker manager)
*The current way of setting up the server requires knowledge with following:*
- *Git*
- *docker*
@maxarouca
maxarouca / node-mongo-dokku-aws-ec2.md
Created March 12, 2019 14:38 — forked from markusdosch/node-mongo-dokku-aws-ec2.md
Node.js App with MongoDB on Dokku (hosted on Amazon EC2)
  1. Create an Ubuntu Server 14.04 LTS Instance (I typically use "Spot Requests" for machines which do not need to stay alive for a long time)
  • Configure Security Groups (inbound rules): All Traffic - All - All - 0.0.0.0/0; SSH - TCP - 22 - 0.0.0.0/0
  • Launch instance
  1. Connect to the instance via PuTTY
  • Host Name: ubuntu@<The Public DNS (see description of the instance)>
  • Connection -> SSH -> Auth -> Authentification parameters -> Select the *.ppk key pair file
  • Open Connection & accept fingerprint
  1. Install Dokku (source: http://dokku.viewdocs.io/dokku/installation/)
  • wget https://raw.githubusercontent.com/dokku/dokku/v0.4.13/bootstrap.sh
  • sudo DOKKU_TAG=v0.4.13 bash bootstrap.sh
@maxarouca
maxarouca / how-to-git-push-to-dokku-droplet-mac.md
Created March 12, 2019 14:39 — forked from john-doherty/how-to-git-push-to-dokku-droplet-mac.md
How to git push to a Dokku Droplet from a Mac

Digital Ocean Droplet

Digital Ocean offers a pre-installed Dokku image. You can run this image on any sized droplet, although larger droplets will allow you to run larger applications.

When choosing your Droplet configuration please disable IPv6. There are known issues with IPv6 on Digital Ocean and Docker, and many have been reported to the Dokku issue tracker. If you would like to run Dokku on an IPv6 Digital Ocean Droplet, please consult this guide.

Dokku setup using a Mac

  1. Login to your Digital Ocean account

Setting up Heroku like deployment is pretty easy. There are lot of reasons why to do this but a big one specifically is cost. Heroku is expensive compared to a $20 DigitalOcean droplet. Of course, learning how to be a system administrator is required but not at all difficult.

In this series of how-to's, we'll be starting off deploying a Ruby on Rails app using a DigitalOcean droplet, Ubuntu, Docker and Dokku all for $5 a month that can easily be scaled to $20 a month (recommended for production apps).

Setup a Droplet

  1. Don't have a DigitalOcean account, create one.

  2. Create a droplet:

  3. Select the One-click Apps tab:

  • Choose an image - Dokku 0.7.2 on 16.04
@maxarouca
maxarouca / dokku-node-mongo.md
Created March 12, 2019 17:44 — forked from fizerkhan/dokku-node-mongo.md
NodeJS and MongoDB app in Dokku with Digital Ocean

Steps:

  1. Create Digital Ocean Droplet with Dokku v0.3.16 on 14.04 image

  2. Login into the droplet and Update local settings.

    sh -c "echo 'LANG=en_US.UTF-8\nLC_ALL=en_US.UTF-8' > /etc/default/locale"
    reboot

DigitalOcean Dokku / Node.js Cloud Environment

Custom recipe to get full Node.js Cloud Environment in DigitalOcean Dokku droplet running from scratch. Yes. Your own Heroku for $5 per month.

I use this gist to keep track of the important configuration steps required to have a functioning system after fresh install.

When you have executed that's all step by step you will get a new working and stable system which is ready to host & serve your Node.js application and databases.

@maxarouca
maxarouca / .editorconfig
Last active January 9, 2020 20:00
React + Eslint + Prettier + editorConfig
root = true
[*]
end_of_line = lf
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true