Skip to content

Instantly share code, notes, and snippets.

View shudarshon's full-sized avatar
🎯
Focusing

Shudarshon Chaki shudarshon

🎯
Focusing
View GitHub Profile
@shudarshon
shudarshon / gist:81e0da2c4d915f64e360d7f023ebe726
Created February 19, 2019 07:23 — forked from timmartin/gist:556b8552735312c0093b4594053c6335
Terraform rules for CloudWatch events triggering CodeBuild
provider "aws" {
region = "us-east-1"
}
resource "aws_codecommit_repository" "test" {
repository_name = "BuildTestRepository"
}
resource "aws_codebuild_project" "build_test" {
name = "BuildTest"
@shudarshon
shudarshon / awc-ecs-access-to-aws-efs.md
Created January 22, 2019 09:45 — forked from duluca/awc-ecs-access-to-aws-efs.md
Step-by-step Instructions to Setup an AWS ECS Cluster

Configuring AWS ECS to have access to AWS EFS

If you would like to persist data from your ECS containers, i.e. hosting databases like MySQL or MongoDB with Docker, you need to ensure that you can mount the data directory of the database in the container to volume that's not going to dissappear when your container or worse yet, the EC2 instance that hosts your containers, is restarted or scaled up or down for any reason.

Don't know how to create your own AWS ECS Cluster? Go here!

New Cluster

Sadly the EC2 provisioning process doesn't allow you to configure EFS during the initial config. After your create your cluster, follow the guide below.

New Task Definition for Web App

If you're using an Alpine-based Node server like duluca/minimal-node-web-server follow this guide:

@shudarshon
shudarshon / Docker_compose_ubuntu_16.04.md
Created January 25, 2018 17:16 — forked from arsho/Basic Commands.md
Step by step installation procedure of Docker in a ubuntu machine.

Install DOCKER COMPOSE in Ubuntu 16.04

What is Docker Compose?

Compose is a tool for defining and running complex applications with Docker. With Compose, you define a multi-container application in a single file, then spin your application up in a single command which does everything that needs to be done to get it running.

Compose uses a YAML file to configure application's services. Then, with a single command, all the services can be started or stopped from the configuration. Some reasons you might want to use Compose :

  • Multiple isolated environments on a single host
@shudarshon
shudarshon / README.md
Created January 15, 2018 06:53 — forked from oodavid/README.md
Backup MySQL to Amazon S3

Backup MySQL to Amazon S3

This is a simple way to backup your MySQL tables to Amazon S3 for a nightly backup - this is all to be done on your server :-)

Sister Document - Restore MySQL from Amazon S3 - read that next

1 - Install s3cmd

this is for Centos 5.6, see http://s3tools.org/repositories for other systems like ubuntu etc

@shudarshon
shudarshon / curl.md
Created October 23, 2017 06:08 — forked from btoone/curl.md
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API.

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin