dekkerglen / CubeCobra

An open source web application for building, managing, and playtesting Magic the Gathering cubes.
https://www.cubecobra.com
Apache License 2.0
193 stars 120 forks source link

Fixes to Localstack setup, and additional installation instructions #2472

Open KaelenProctor opened 4 weeks ago

KaelenProctor commented 4 weeks ago

While setting up Cube Cobra locally (using Windows Subsystem for Linux, but that should have no effect in comparison to a regular Linux system) I ran into a few complications which this PR resolves.

Manual testing:

  1. Used an Ubuntu 22.04 virtual machine to complete setup with fixes along the way, until I was able to successfully run Cube Cobra locally including the cards from Scryfall
  2. Started a fresh Ubuntu 24.04 virtual machine and ran through the install steps one by one from scratch, to ensure all dependencies were installed and in correct versions

Concerns:

  1. The yarn lock appears to have been reverted to the yarn 1.X format within this commit a month ago. While this is easily correctable with a yarn install back to the Yarn 4.X format (to match the package.json requirements), and I plan to open another PR to fix that, in my testing I found that Yarn 1 and 4 will complain about each other.
    • For example with Yarn 1.X it will complain about the package.json requiring yarn 4.4.0 when you install, thus unsure how the lock file format got reverted
    • I have not been able to find a lint or yarn command to ensure the yarn.lock file is the correct 4.X format in order to add to the CI validation (or git commit hook ideally)
  2. I'm not a python expert and with recent Linux distributions disallowing system wide package installs in favour of virtual environments, I'm not confident on the awslocal install instructions are best practice nor conflicting with people's existing python setups. So I am also working on a full docker compose setup to help isolate all the dependencies for the build and setup processes, if that is a desirable outcome (I'll ask in the Discord).