Hey馃憢 I’m Oscar from 馃椇锔廚ew Zealand

Welcome to my technical blog!
Here, you’ll find useful insights and knowledge to help you stay ahead in the industry.
Thanks for stopping by, and I hope you enjoy what you read.
Find about me more 猬囷笍

[mTLS] How to Generate Self-Signed mTLS Certs and Keys in 10s (No Click Bait)

1. Introduction No matter if you are a software developer, a quality assurance engineer, or a DevOps engineer, you may need to generate a self-signed mutual TLS(mTLS) or TLS certificates and keys for testing purposes. As the title shows, this post is not a click bait. I will show you how to generate a self-signed TLS certificate and key in 10s for both server and client. Of course, if you have mTLS certificate and key files, you can also use part of them as self-signed TLS certificate and key....

[ent/SQLite3] insert nodes to table "users": near "RETURNING": syntax error

Problem If you use ent with sqlite3 driver in your Golang project, you may encounter the following error when you try to insert a new record to the table. insert nodes to table "users": near "RETURNING": syntax error Analysis The error message indicates that the sqlite3 driver does not support the RETURNING clause. If you are using Golang sqlite3 package github.com/mattn/go-sqlite3 in your project. The issue may be caused by the version of the package....

traefik reverse proxy to non-containerized service

[Traefik/OCI] Exposing Internal Non-Containerized Services with Traefik on OCI: A Step-by-Step Guide

Traefik is a popular reverse proxy that can be used to expose internal containerized services to the public in a simple and intuitive way. However, if you want to expose internal services that are installed and configured directly on the host system instead of containerized, you may encounter some difficulties, particularly when using Oracle Cloud Infrastructure (OCI). This technical post will provide a step-by-step guide on how to expose internal non-containerized services to the public using Traefik on OCI....

[Gitea] RewriteAllPublicKeys failed: open /data/.ssh/authorized_keys.tmp: permission denied

Gitea has recently released version 1.20.0, and I endeavored to upgrade my locally-hosted instance from version 1.17.0 to 1.20.0. During this process, I encountered the following error when attempting to execute the docker-compose file: routers/init.go:60:mustInit() [F] code.gitea.io/gitea/models/asymkey.RewriteAllPublicKeys failed: open /data/git/.ssh/authorized_keys.tmp: permission denied Received signal 15; terminating. This issue is not exclusive to the new version, as some users have reported similar problems when upgrading from older versions, such as 1.17.3 to 1....

[OCI/Swarm] How to Fix the "connect: no route to host" Error When Joining a Docker Swarm in OCI VM

Hey there, if you鈥檙e getting a super frustrating error when trying to join a Docker Swarm in Oracle Cloud Infrastructure (OCI) VM, then you鈥檝e come to the right place! Here鈥檚 the error message you might see: Error response from daemon: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp 132.12.23.123:2377: connect: no route to host" Yikes! But don鈥檛 worry, we鈥檝e got some easy steps you can follow to fix it and get back to your Docker swarming in no time....

SFTP SaaS platform - Securely transferring files between local machines and remote servers.

[SFTP/SaaS] How does Cloud-Based SFTP SaaS work?

If you have ever wonder that how the SFTP(Secure File Transfer Protocol) SaaS(Software as a Service) product architecture looks like, this post will give you a brief introduction. Designing the architecture for an SFTP SaaS product involves considering various components and their interactions. Here鈥檚 a high-level architecture for an SFTP SaaS product: 1. High-level Architecture 1.1 User Interface (UI) Develop a user-friendly web-based interface that allows users to manage their SFTP accounts, access files, and perform file operations....

[Docker/DinD] Empowering Local Development: Simulating Mass Containers and Docker Swarm Nodes with Docker-in-Docker (DinD)

Introduction In the realm of modern software development, the use of containerization has revolutionized the way applications are developed, tested, and deployed. Docker, a popular containerization platform, allows developers to create lightweight and isolated environments known as containers. However, when dealing with scenarios involving multiple containers that require isolated environments, testing and debugging can become quite a challenge. Enter Docker-in-Docker (DinD), a powerful tool that alleviates these pains and streamlines the development process....

[Golang/VSCode] Master Golang Debugging in VSCode: Step-by-Step Guide with Delve

Introduction If you are rocking VSCode as your IDE for Golang development and haven鈥檛 installed the debugger, I would recommend you to do it now. And Don鈥檛 worry, I鈥檝e got your back. In this friendly guide, I鈥檓 going to walk you through the process of setting up and configuring the Golang debugger in VSCode. Step by step guide 1. Install the Debugger for Golang Delve, a fantastic open-source project, is your go-to debugging companion for Golang in VSCode....

Drone CI Pipeline Routing

[DroneCI] How to Specify Pipelines to Run on the Particular Drone CI Runner

Let鈥檚 say you have multiple Drone CI runners. By some reasons, you want to route pipelines to a particular Drone CI runner. How do you do that? The answer is to use the DRONE_RUNNER_LABELS environment variable to label your Dronce CI runner and in the Drone CI pipeline, specify the the label value under the node section. Scenario Without examples, it鈥檚 hard to understand. So let鈥檚 go through an example....

Illustration: Docker container security - disabling SSH for production environments.

[Dockerfile] How to Prevent Docker Container from SSHing

While SSH is a valuable tool for debugging and testing Docker containers, enabling it in production environments is not recommended due to security concerns. To disable SSH in a Docker container, it鈥檚 advisable to remove the SSH server during the image building process. One way to accomplish this is to remove the SSH server during the Docker image building process. For example, if you鈥檙e using the alpine base image, you can use the following Dockerfile:...