add magento blog post

This commit is contained in:
2024-07-09 18:10:51 +02:00
parent a70d55b182
commit 5e79a68ac2
4 changed files with 64 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

View File

@@ -6,6 +6,14 @@
@apply text-lg py-2 font-pt-sans; @apply text-lg py-2 font-pt-sans;
} }
#content h1 {
@apply text-3xl font-pt-sans font-bold;
}
#content h2 {
@apply text-2xl font-pt-sans font-bold;
}
#content em { #content em {
@apply italic text-gray-300; @apply italic text-gray-300;
} }

View File

@@ -0,0 +1,56 @@
---
layout: ../../../layouts/MarkdownLayout.astro
title: 'using magento? why?'
pubDate: 2024-07-09
description: 'A delightful rant about setting up Magento in 2024.'
---
![I hope it burns in Hell](/blog/magento/hell.jpg)
Hey there reader!
I hope you're doing well, and that you're not using Magento for your e-commerce website. If you are, <small>I'm sorry</small>.
I just have one question for you: why are you using Magento?
My experience with Magento has been nothing but a nightmare.
I didn't want to use it in the first place but a friend of mine was interviewing for a job at a company that uses Magento, and he asked me to help him set up a Magento store, because he didn't manage to do it on his own.
I thought it would be a fun little project but instead, it turned into a giant pile of shit that I'm still cleaning up.
## Setup
The first thing we tried was to just use Docker, and while Bitnami does provide an image and a whole `docker-compose.yml` file, when he tried to run it on his Linux machine it simply didn't want to connect to the database for whatever reason.
Oddly enough, it worked on my Mac (<small>Glorious victory!</small>)...???
So, I SSH'd into my server and tried to run it there.
# Now here's the fun part!
Even though my server also runs Linux, it worked... well, kind of.
The reverse proxy was having trouble because for whatever reason Magento decided it would be a genius idea to redirect to http://localhost
Okay, fine? I changed some environment variables, re-ran the image and voila! Worked without a hitch! Right?
![I fucking hate Magento](/blog/magento/error.jpg)
# Except...
I was running Magento via HTTP (not HTTPS, because the reverse proxy handles SSL), so Magento's once again glorious thinking decided to load CSS via HTTP and not HTTPS causing the entire admin panel to break.
This indicated that for whatever reason the base URL was being read from environment variables, instead of the actual URL... smh.
# BUT WAIT, THERE'S MORE!
So with little sanity that I had left, I decided to just enable mixed content in the browser and see if that would fix it.
And while it did load all the fancy CSS and JS, the dreaded "CORS" was still there and the admin panel was virtually unusable.
At that point I decided to just jump out of the window, piss on the server and light it on fire, all while screaming ungodly things at Adobe, Magento and the entire e-commerce industry.
I do however, dear reader, hope you have a pleasant and Magento-free day!
<small>I'm not even joking, if something is not easy to setup in Docker, it's not worth using.</small>