Tech Blog by Adrien Poupa

I am a passionate full-stack developer based in Montreal, Canada. Nowadays, my focus is on PHP applications based on Laravel and Vue.js, but I am also interested in DevOps, the AWS platform, and the cloud in general. I also do Android development from time to time.

Open-source software is really important for me, so I try to give back to the community as much as I can by creating new packages, sharing the knowledge I have on my blog, submitting pull requests or reporting bugs.

On this blog, I mostly write about my projects, or my shiny discoveries 🙂

Serving a S3 Bucket with Kubernetes and Ingress-Nginx

The traditional, production-ready way to serve a S3 bucket in production is usually to create a CloudFront distribution, add a S3 origin and configure the desired behaviour. However, this comes with a small caveat: while you can specify an origin path, this will make CloudFront request the bucket from the path directory, then appending the requested URL. For example, given the test origin path, example.com/index.html will retrieve s3://bucket-name/test/index.html; example.com/folder/index.html will retrieve s3://bucket-name/test/folder/index....

March 3, 2024 · 2 min · Adrien Poupa

Embracing Static Site Generation: WordPress to Hugo Migration

This is it! I finally migrated my blog to Hugo! Static Site Generation? After close to a decade of running WordPress and months of procrastination, I finally took the decision to join the cool kids and drink the static website kool aid. There are numerous benefits with this approach: I no longer need to rent a dedicated server. So long Kimsufi, it’s been great! Attack surface is much smaller, if not nonexistent I can use Markdown to write posts and stop fighting Gutenberg No need to worry about backups, WordPress and PHP upgrades Hosting is free GTmetrix performance is 100% Selecting a Static Site Generator There is no shortage of static site generators these days....

January 23, 2023 · 4 min · Adrien Poupa

Migrating Away from G Suite Legacy Free Edition: 2022 Email Providers Overview

On January, 19 2022 Google announced they were pulling the plug on the G Suite Legacy Free Edition, that was offered from 2006 to 2012. Among other things, it was offering Gmail with a custom domain. Like many others, I subscribed to what was called Google Apps back then, to give custom e-mail addresses to my family (ie: [email protected]). Over the years, we used those Google accounts like personal accounts and bought applications, used Google Drive, Google Documents, and so on....

February 8, 2022 · 11 min · Adrien Poupa

Creating a Global Loader Component in Vue.js

In any frontend application, invariably, one has to deal with showing the user an HTTP request is in progress. This is usually done by displaying a spinner while the request is being executed. As I got bored dealing with Axios callbacks and independent isLoading data property in my Vue.js components, I realized I needed a global solution that would prevent me from cluttering my components with those redundant data properties....

September 20, 2020 · 4 min · Adrien Poupa

Modernizing a Legacy PHP Application

Update Aug, 11: This post was well received on Reddit, so I added new anti-patterns to reflect the comments. Recently, I had the chance occasion to work on numerous legacy PHP applications. I spotted common anti-patterns that I had to fix. This article is not about rewriting an old PHP application to <insert shiny framework name here>, but about how to make it more maintainable and less of a hassle to work on....

August 10, 2020 · 8 min · Adrien Poupa

Modern PHP Development for WordPress

Let’s face it, WordPress’ reputation among PHP developers is atrocious. It is, for the most part, justified by the questionable code quality of most plugins (because the barrier entry is very low), the will of the core developers to keep backwards compatibility at all cost, and, as a result, its architecture. However, as you may have noticed, this blog is running WordPress. Why would you ask me? Well, despite all its flaws, WordPress is stupidly easy to use and complete....

February 1, 2020 · 4 min · Adrien Poupa

Deploying a Containerized PHP Application to AWS Using Docker and ECS

Since I’ve been playing around with Laravel Envoy, I kept wondering how I could improve the deployment process. For sure it works and I’ve been using it for 6 months or so on a project in production, but having to deal with a physical server has drawbacks I wanted to overcome. For example, the PHP team just released 7.4 packed with cool features I am eager to try. But on a physical server, one has to manually upgrade the PHP version, for each environment and this is a process prone to errors and can lead to different results in different servers....

January 15, 2020 · 17 min · Adrien Poupa

Using highlight.js on WordPress

I was looking for a replacement for the syntax highlighter I was using on my blog, since SyntaxHighlighter Evolved never really gave me satisfaction (unwanted advertisements next to the code blocks, poor styling). I wanted a lightweight solution and found highlight.js. It highlights blocks on code on the client side and can be enabled with just a few lines: <link rel="stylesheet" href="/path/to/styles/default.css"> <script src="/path/to/highlight.pack.js"></script> <script>hljs.initHighlightingOnLoad();</script> There used to be a plugin to integrate it to WordPress but it was removed for security reasons (I am not sure what this means)....

January 14, 2020 · 2 min · Adrien Poupa

Migrate Routines to Laravel

I had to work on a project that made heavy use of MySQL routines: stored procedures, views, functions and triggers. In the process of adding Laravel to the application, I found good packages to seed the database from existing data, create models from the existing schema and create migrations from existing tables. However, I could not find anything to migrate the existing routines as a migration. I needed this to be able to make the existing application work when seeding a new database....

December 22, 2019 · 2 min · Adrien Poupa

Zero Downtime Laravel Deployments with Laravel Envoy

Recently, I was looking for a way to deploy a Laravel application with ease and no headache. After some time, I wrote a very basic Bash script to automate the common deployment tasks: pulling changes from Git, installing Composer dependencies, building NPM scripts, running migrations and so on. But it was still feeling primitive. There had to be a better way. After some research, I found Laravel Envoyer. This service offers everything I needed but I was not ready to pay the costs associated....

June 2, 2019 · 6 min · Adrien Poupa