Categories
docker sql

Docker: MySQL

https://hub.docker.com/r/mysql/mysql-server/ Download docker pull mysql/mysql-server:latest Create Option 1 – docker run docker run -d \ –name mysql-itsmetommy \ -p 3306:3306 \ –env=”MYSQL_ROOT_PASSWORD=password” \ mysql/mysql-server:latest Option 2 – docker-compose cat <<EOF > docker-compose.yml version: ‘3.8’ services: db: image: mysql:latest restart: always environment: MYSQL_DATABASE: ‘db’ # Optional user account MYSQL_USER: ‘tommy’ # Password for optional user account […]

Categories
Code

Markdown Preview using Sublime Text

Preview and build your markdown files (e.g. README.md) in your web browser using Sublime Text. https://github.com/facelessuser/MarkdownPreview Install Open Command Palette. Option 1: Type control+shift+p Option 2: Tools → Command Palette… Type “install” and select “Package Control: Install“. Type “markdownpreview” and select it. Restart Sublime Text. Open your README.md file. Example Open the Command Palette and type “markdown preview“. Select “Markdown Preview: Preview […]

Categories
postgresql sql

Securing PostgreSQL using Host Based Authentication (HBA)

HBA stands for Host-base Authentication. The pg_hba.conf config file controls the authentication method. By default, local connections to Postgres uses peer authentication. That means that instead of asking you for a password, it checks to see if you are currently logged in as a system user that matches the user name in Postgres. This is where […]

Categories
gcp Kubernetes

Kubernetes: Install Grafana & Prometheus on GKE using Helm Bitnami

Install Grafana https://github.com/bitnami/charts/tree/master/bitnami/grafana Create namespace kubectl create ns monitoring Add repo helm repo add bitnami https://charts.bitnami.com/bitnami Update repo helm repo update View version helm search repo -l bitnami/grafana | head Create custom_values.yaml https://github.com/bitnami/charts/blob/master/bitnami/grafana/values.yaml I added an annotation because I wanted an internal IP for the Load Balancer. Feel free to remove that section. vi custom_values.yaml […]

Categories
docker

Push to Docker Hub using GitHub Actions

Knock-knock! Who’s there? Jenkins. Jenkins who? jk 🤣 Links https://docs.github.com/en/actions https://github.com/actions https://github.com/marketplace (think of it as an alternative to Jenkins plugins) https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions https://lab.github.com/githubtraining/github-actions:-publish-to-github-packages Create & clone repo Create a GitHub repository. Clone your repository and cd into it. git clone git@github.com:itsmetommy/github-actions.git && cd github-actions Create secrets Settings → Secrets Click New repository secret. Create two secrets. Create DOCKER_USERNAME. […]