Posts

Showing posts from August, 2023

Cross-cutting programming techniques

The great thing about coding in different languages is you realise they tend to borrow from one another and you're able to apply patterns, styles and principles across languages.  Being trained in backend development and Object Oriented Programming (OOP), I found it strange but useful that Javascript (JS) would allow you to define single functions and import them into your code. I mostly work with Drupal and PHP. But it wasnt until I used Laravel that I found PHP traits which gives you the same ability as Javascipt to reuse a function in multiple places.  Furthermore using Python I found skipping semi colons for each line of code liberating. When I realised JS supported this, it was byebye semi colons. These days Im in love with JS for being super responsive. But I know that securing the backend is critically important. 

Cloud Development environments for LEMP stack using Android in Samoa

Image
  Cloud IDEs have exploded in recent times with the likes of Replit , Stackblitz and CodeSandbox . They allow you to code from any machine using only your browser and a stable internet connection. Many options favour Javascript (JS) frameworks such as Vue , React and Svelte . Yet, it's difficult to find support for a LEMP stack which uses Linux, Nginx, Mariadb/ MySQL and PHP. Codespace for Cloud Dev environments using Docker Compose Recently, I had to work from my phone so I looked at Cloud IDEs to code using Samsung Dex . I tried several options and chose Github Codespace . Codespace lets you get started for free. Out of the box you have access to docker, docker compose, node and git from the terminal. You also have a VsCode Editor available. The repo I worked on was already set up for docker and docker compose. With this setup, Nginx, Mariadb and PHP all run in their own containers and use Docker Compose to communicate . Getting started was a matter of cloning my repo from Git

Upgrading Wodby servers from Debian 9 to 11

Image
  TL;DR You need to upgrade from Debian 9 to 10 . Then from Debian 10 to 11 . IMPORTANT: Before upgrading to the next major version of an OS, the docs recommend to: Stop kube and docker services at first Perform the upgrade Reboot Make sure Docker was not installed from packages (we require a specific version that we manually install during server connection) Check iptables version via iptables --version . If it's 1.8.2 or newer switch it to legacy mode: update-alternatives --set iptables /usr/sbin/iptables-legacy Make sure cgroup2 disabled Background We use the Wodby service to effortlessly provision and deploy our web applications. It allows you to bring your own servers and deploy your own stacks using docker containers. Out of the box they provide several popular stacks such as Drupal and Wordpress. The Docs While performing some maintenance I realised that one of my servers was running Debian 9 and wanted to upgrade it the recommended Debian 11. I dove strai