crazyoptimist
Blog
About
  • Automatic Https With Caddy - Extremely Easy

    Jun 7, 2022 · 2 min read  ·
    Share on:

    Today I had a chance to try Caddy for dev purpose, and you guess what, it was extremely easy and funny. Only two steps and boom, you got a secured website almost instantly. Here are the steps I followed: Install Caddy on Ubuntu/Debian Check their documentation for another OS/installation method. 1sudo apt install -y …

    Read More
  • How to Deploy Next.js App to AWS EC2 in Production and Set up CI/CD with Github Actions

    Feb 4, 2022 · 4 min read  ·
    Share on:

    Yo! In this article, we are going through deploying a Next.js app to AWS EC2 and set up continuous integration & deployment by means of Github Actions. Before proceeding, you will need the infrastructure ready on AWS, which can be deployed manually or by Terraform code. I'm skipping the infra part for the purpose …

    Read More
  • Git Cheatsheet - 2021

    Dec 4, 2020 · 6 min read  ·
    Share on:

    Creating Snapshots Browsing History Branching & Merging Collaboration Rewriting History Housekeeping(Personal Favorites) Creating Snapshots Initializing a repository 1git init Staging files 1git add main.go Makefile # Stages multiple files 2git add . # Stages the current directory and all its content Viewing the …

    Read More
  • Podman Basic Notes

    Nov 7, 2020 · 1 min read  ·
    Share on:

    Playing around with Podman 1alias docker="sudo podman $1" The above command works as of this time and podman makes namespaces for every users for every resources, i.e., images, containers and so on. It means, podman images and sudo podman images will show different resources.😎 1sudo podman pod create --name …

    Read More
  • Kubernetes Basic Notes

    Nov 7, 2020 · 1 min read  ·
    Share on:

    Kubectl Installation 1curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" 2chmod +x kubectl 3echo $PATH 4sudo mv kubectl /usr/local/bin/ Minikube Installation 1curl -LO …

    Read More
  • How to Make a Swap Space Using a Swap File in Linux

    Oct 6, 2020 · 2 min read  ·
    Share on:

    This article is based on the content of aws knowledgebase. You might have been stuck in memory leak when building some kinda javascript-heavy frontend apps like Vue or React on a cloud server itself. Just for serving built artifacts, we do not need large instances, but still the building process is always hungry for …

    Read More
  • GPG Key in Git - Get Your Every Commit Verified

    Oct 4, 2020 · 2 min read  ·
    Share on:

    This article is based on the contents of the Github's documentation. You will get your own verified badge on every git commits once you configure your GPG key with your VCS. First things first, check your gpg version using this command: 1gpg --version Allow me to assume that you are on version 2.1.17 or greater. Use …

    Read More
  • Deploy Your Web Apps in Just a Minute - Made With 💖 for Dockerists

    Sep 7, 2020 · 1 min read  ·
    Share on:

    As a software engineer or a DevOps engineer, you may come up with boring tasks frequently, one of which is setting up a new cloud environment for deployment of your awesome web apps/micro services. Using the following script, you will lose the dull pain. Just grab the script and run it with bash, then you will get the …

    Read More
  • How to Use Jenkins - A Basic Way of Deployment Automation for Lazy Developers

    Jun 11, 2020 · 2 min read  ·
    Share on:

    I strongly believe that "lazy developer" is a synonym of "talented developer" from a motivational point of view. Okay, let's get started with Jenkins setup then. Let's go for password login for deployment, remembering that it's not the only way nor an elegant way of implementation, but just follow …

    Read More
  • Let's Encrypt - The Right Way in 2021

    Jun 11, 2020 · 1 min read  ·
    Share on:

    Install Certbot Install snapd. Remove old version of certbot: 1sudo apt-get remove certbot 2# or 3sudo dnf remove certbot Install certbot: 1sudo snap install --classic certbot 2sudo ln -s /snap/bin/certbot /usr/bin/certbot Run it! 1sudo certbot --nginx Caution! In case you have an IP access blocking config in nginx, …

    Read More
  • How to Install The Latest Version of Nginx on Ubuntu Bionic

    Apr 7, 2020 · 1 min read  ·
    Share on:

    Nginx.org maintains a repository for Ubuntu. We can use this repository to install the latest version of Nginx. First off, let's create a repository source file for Nginx with the following command. 1vim /etc/apt/sources.list.d/nginx.list Paste in the following two lines to the file: 1deb [arch=amd64] …

    Read More
  • How to Build a CI/CD Pipeline on CircleCI

    Mar 11, 2020 · 1 min read  ·
    Share on:

    Once you got your account on CircleCI and setup your project linked to your git repository, you will have to have a directory named “.circleci” inside the root of your project repo. Create a file named “config.yml” in there. Grab the sample script given by CircleCI platform according to your project type. The first …

    Read More
  • How to Configure a Nginx Reverse Proxy With Let's Encrypt

    Mar 11, 2020 · 3 min read  ·
    Share on:

    Let’s say one of your micro services is running on http://localhost:3000 If you already have a nginx service running on the server, create a server block like this: 1vim /etc/nginx/sites-available/domain.com.conf Grab this content to paste in: 1server { 2 3 server_name domain.com; 4 5 root /var/www/html; 6 index …

    Read More
  • How to Use Git Rebase in a Practical Situation

    Feb 24, 2020 · 1 min read  ·
    Share on:

    Let’s say there are two pull requests open on a project repository. Each change has its own branch like this: master feature/add-base64-endpoint feature/add-user-agent-endpoint The challenge is to use git rebase to add both changes to master. When you finished, your master branch should have three commits in the …

    Read More
  • How to Setup a Reverse Proxy With Let's Encrypt SSL Certificates Using Docker

    Jan 8, 2020 · 3 min read  ·
    Share on:

    I think this is really important in practical docker battle field. 🙂 Let’s go for the docker-compose.yml first. 1version:'3'23services:4nginx:5image:nginx:1.15-alpine6restart:unless-stopped7volumes:8- ./data/nginx:/etc/nginx/conf.d9- ./data/certbot/conf:/etc/letsencrypt10- …

    Read More
  • How to Host Wordpress Using Docker

    Jan 6, 2020 · 1 min read  ·
    Share on:

    Let’s go for our docker-compose.yml first. 1version:'3'23services:4wp:5image:wordpress:latest6ports:7- ${IP}:80:808volumes:9- ./php.conf.ini:/usr/local/etc/php/conf.d/conf.ini10- …

    Read More
  • Basic Docker Notes

    Dec 28, 2019 · 2 min read  ·
    Share on:

    To run a container from an image: 1docker container run -it --rm ubuntu /bin/bash -t: terminal inside -i: (STDIN) grabbing --rm: remove container automatically when process exits --name: name the container or daemon -d: daemonize the container running To list all containers: 1docker container ps -a To start or stop …

    Read More
  • How to Setup LAMP Stack on Centos 7 - Right Way

    Dec 25, 2019 · 1 min read  ·
    Share on:

    Today I am going to follow up the procedures to setup standard LAMP stack on CentOS 7. For the latest version of phpMyAdmin: 1rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY* 2yum -y install epel-release For MariaDB: 1yum -y install mariadb-server mariadb 2systemctl enable --now mariadb 3mysql_secure_installation For Apache: …

    Read More
  • How to Install Letsencrypt Certbot for Apache on Centos 7

    Dec 20, 2019 · 1 min read  ·
    Share on:

    Simply follow this script below: 1yum install epel-release -y 2yum install certbot python-certbot-apache mod_ssl -y 3certbot --apache Create a cron job which renews certification once a week. 1crontab -e 10 0,12 * * * python -C 'import random; import time; time.sleep(random.random() * 3600)' && certbot …

    Read More
  • How to Setup a Reverse Proxy With Nginx on Centos 7

    Dec 20, 2019 · 1 min read  ·
    Share on:

    First off, install nginx on the server machine. 1yum update 2yum install epel-release 3yum install nginx Edit the nginx config file then. 1cd /etc/nginx/nginx.conf 2vim nginx.conf Edit the file like this: 1server_name domain.com; If you are not going to use domain name, a public ip address would also work instead of …

    Read More
    • ««
    • «
    • 1
    • 2
    • »
    • »»

crazyoptimist

Software Engineer
Read More

Featured Posts

  • Automatic Https With Caddy - Extremely Easy
  • How to Deploy Next.js App to AWS EC2 in Production and Set up CI/CD with Github Actions
  • GPG Key in Git - Get Your Every Commit Verified
  • Deploy Your Web Apps in Just a Minute - Made With 💖 for Dockerists

Recent Posts

  • Python Development Environment Setup - an Excellent Way
  • Setup Neovim with vim-plug on Windows 11

Categories

DEVOPS 23 NETWORK 11 LINUX 6 DOCKER 3 GOLANG 3 JAVASCRIPT 3 VIM 2 PYTHON 1
crazyoptimist

Copyright  CRAZYOPTIMIST. All Rights Reserved