---
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 <small>(I had to use reverse proxy to expose it to the Internet so my friend could use it)</small>

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.

The sample data he got from the company to import or whatever didn't work at all, and everything was falling apart.

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>
