Skip to content

Instantly share code, notes, and snippets.

View ProMasoud's full-sized avatar
😃
Focusing

Masoud Tavakkoli ProMasoud

😃
Focusing
View GitHub Profile
@ProMasoud
ProMasoud / healthcheck.sh
Created January 25, 2024 19:11
A Simple shell for health check URLs
timestamp=$(date +%Y-%m-%d_%H-%M-%S)
link="https://"$1"/?health="
link+=$timestamp
echo $link
echo "Checking health ..."
if [ "$(curl --write-out "%{http_code}\n" --silent --output /dev/null $link )" == "200" ]; then
echo "All Good."
else
[mysqld]
relay-log = mysql-relay-bin.log
binlog_do_db = DB_NAME
log_bin = mysql-bin.log
server-id = 2
tmpdir = /tmp
binlog_format = ROW
max_binlog_size = 500M
sync_binlog = 1
expire-logs-days = 3
[mysqld]
server-id = 1
log-bin = mysql-bin-1.log
binlog_format = ROW
binlog_do_db = DB_NAME
tmpdir = /tmp
max_binlog_size = 500M
sync_binlog = 1
expire-logs-days = 3
@ProMasoud
ProMasoud / docker-compose.master.yml
Created June 1, 2021 11:14
docker-compose.master.yml
version: '3'
services:
db:
image: mysql:8.0
container_name: db
restart: always
ports:
- $DB_PORT:3306
command:
@ProMasoud
ProMasoud / .env
Created June 1, 2021 11:07
Mysql Replication in docker
DB_PORT=
DB_DATABASE=
DB_USERNAME=
DB_PASSWORD=