Skip to content

Instantly share code, notes, and snippets.

View rkdgusrnrlrl's full-sized avatar

Kang Hyeon Ku rkdgusrnrlrl

View GitHub Profile
@rkdgusrnrlrl
rkdgusrnrlrl / README.md
Created July 14, 2023 00:30 — forked from JosimarCamargo/README.md
How to setup a Postgres replication with docker and docker-compose

How to setup a Postgres replication with docker and docker-compose

How to use

To run you will need docker and docker-compose installed, and run the command docker-compose up on a folder within this file named docker-compose.yml(attached in this Gist)

How the PGAudit is enable, you will see the queries log and in which database is running which query, this is the main purpose of this Gist, along with have a database with replication working out of the box

To add user with just reading rights to access the database on slave replica

@rkdgusrnrlrl
rkdgusrnrlrl / docker_cheat.md
Created December 22, 2018 01:54 — forked from nacyot/docker_cheat.md
๋„์ปค(Docker) ์น˜ํŠธ ์‹œํŠธ

Docker ์น˜ํŠธ ์‹œํŠธ

ํ•œ๊ตญ์–ด ๋ฒˆ์—ญ(์ดˆ๋ฒŒ) : nacyot

์™œ Docker๋ฅผ ์‚ฌ์šฉํ•ด์•ผํ•˜๋Š”๊ฐ€?

Why Should I Care (For Developers)

"๋‚˜์—๊ฒŒ Docker์˜ ๋งค๋ ฅ์€ ๊ฐ„๋‹จํžˆ ๊ฒฉ๋ฆฌ๋œ ํ™˜๊ฒฝ์„ ๋งŒ๋“ค ์ˆ˜ ์žˆ๋‹ค๋Š” ๊ฒƒ๊ณผ, ๊ทธ๋Ÿฌํ•œ ํ™˜๊ฒฝ์„ ์žฌ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค๋Š” ์ ์ด๋‹ค."๋Ÿฐํƒ€์ž„ ํ™˜๊ฒฝ์„ ํ•œ ๋ฒˆ ๋งŒ๋“ค์–ด ํŒจํ‚ค์ง€๋กœ ๋งŒ๋“ค๋ฉด, ์ด ํŒจํ‚ค์ง€๋ฅผ ๋‹ค๋ฅธ ์–ด๋–ค ๋จธ์‹ ์—์„œ๋„ ๋‹ค์‹œ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค. ๋˜ํ•œ ์—ฌ๊ธฐ์„œ ์‹คํ–‰๋˜๋Š” ๋ชจ๋“  ๊ฒƒ์€ ๋งˆ์น˜ ๊ฐ€์ƒ๋จธ์‹ ๊ณผ ๊ฐ™์ด ํ˜ธ์ŠคํŠธ๋กœ๋ถ€ํ„ฐ ๊ฒฉ๋ฆฌ๋˜์–ด์žˆ๋‹ค. ๋ฌด์—‡๋ณด๋‹ค๋„ ์ด๋Ÿฐ ๋ชจ๋“  ์ผ๋“ค์ด ๋น ๋ฅด๊ณ  ๊ฐ„๋‹จํžˆ ๊ฐ€๋Šฅํ•˜๋‹ค.

# git filter-branch ์‚ฌ์šฉ๋ฒ•
์™ธ๋ถ€ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ๋˜๋Š” ํ”Œ๋Ÿฌ๊ทธ์ธ์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ(์ดํ›„ ์˜์กด์„ฑ์ด๋ผ ์ง€์นญ) ๋ฐ”์ด๋„ˆ๋ฆฌ ํ˜น์€ ์†Œ์Šค์ฝ”๋“œ๋ฅผ ํ”„๋กœ์ ํŠธ ๋””๋ ‰ํ„ฐ๋ฆฌ ์•ˆ์—์„œ ๊ด€๋ฆฌํ•˜๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. git์„ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ ๋‚ด๋ ค๋ฐ›์€ ์™ธ๋ถ€ ์˜์กด์„ฑ๋“ค์˜ ๋ฐ”์ด๋„ˆ๋ฆฌ, ์†Œ์Šค์ฝ”๋“œ๋Š” `.gitignore` ํŒŒ์ผ์— ์ถ”๊ฐ€ํ•ด์„œ git ์ด ์ถ”์ ํ•˜์ง€ ์•Š๋„๋ก ํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค.
์‹ค์ˆ˜ ํ˜น์€ ์˜๋„์น˜ ์•Š๊ฒŒ git์œผ๋กœ ๊ด€๋ฆฌํ•˜๋Š” ํŒŒ์ผ์ด ๋œ ๊ฒฝ์šฐ ํŒŒ์ผ์„ ์‚ญ์ œํ•˜๋”๋ผ๋„ ํžˆ์Šคํ† ๋ฆฌ์— ๋‚จ๊ฒŒ ๋ฉ๋‹ˆ๋‹ค. ๋งŒ์•ฝ ์šฉ๋Ÿ‰์ด ํฐ ๋ฐ”์ด๋„ˆ๋ฆฌ ํŒŒ์ผ์ด ํžˆ์Šคํ† ๋ฆฌ์— ์ถ”๊ฐ€๋œ ๊ฒฝ์šฐ ์†Œ์Šค์ฝ”๋“œ ์ €์žฅ์†Œ์— ๋”ฐ๋ผ `push` ๋ฅผ ํ•  ์ˆ˜ ์—†๋Š” ๊ฒฝ์šฐ๊ฐ€ ์ƒ๊น๋‹ˆ๋‹ค.
**filter-branch** ๊ธฐ๋Šฅ์„ ์‚ฌ์šฉํ•˜๋ฉด ์ปค๋ฐ‹์—์„œ ํŠน์ • ํŒŒ์ผ์„ ์ง€์šธ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๋ชจ๋“  ์ปค๋ฐ‹์„ ์ถ”์ ํ•˜์—ฌ ์‚ฌ์šฉ์ž๊ฐ€ ์ง€์ •ํ•œ ์ž‘์—…์„ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
git์œผ๋กœ ๊ด€๋ฆฌํ•˜๊ณ  ์žˆ๋Š” ํ”„๋กœ์ ํŠธ์—์„œ ์•„๋ž˜ ๋ช…๋ น์–ด๋กœ ์ž‘์—…ํ•ฉ๋‹ˆ๋‹ค.
@rkdgusrnrlrl
rkdgusrnrlrl / GitHub-Project-Guidelines.md
Created July 8, 2018 03:03 — forked from rsp/GitHub-Project-Guidelines.md
Strict Flow and GitHub Project Guidelines - setup rules and git flow for commercial and open-source projects by @rsp

Strict Flow and GitHub Project Guidelines

This documment explains how to set up and develop a software project using Git in general and GitHub in particular (but it can be easily adapted to work on any Git platform like GitLab, Bitbucket or any other, as everything outside of the GitHub configuration section is not GitHub-specific). It consists of rules that proved to work well over the years in multiple commercial and open-source projects, both small and large-scale.