Skip to content

Instantly share code, notes, and snippets.

View LucasBSC's full-sized avatar
🏠
Working from home

Lucas Bastos LucasBSC

🏠
Working from home
View GitHub Profile
@LucasBSC
LucasBSC / git-deployment.md
Created October 21, 2019 05:37 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@LucasBSC
LucasBSC / post-receive
Created October 21, 2019 05:01 — forked from guillaumewuip/post-receive
Git post-receive hook : build then run a docker container
#!/usr/bin/env bash
# A git post-receive hook
#
# On master branch only :
# 1. It builds a docker image named with the dir name
# 2. It then stop container of the same name, rm it and start a new one
## --- Config