Skip to content

Containerise and add automatic builds #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 27 commits into
base: master
Choose a base branch
from

Conversation

fpiesche
Copy link

@fpiesche fpiesche commented Aug 10, 2022

This does a number of things:

  • Add Dockerfiles to allow Docker containers to be built for testing, development and production purposes - easier than having to install and configure Apache and set up the app!
  • Add configuration files for Visual Studio Code to do some automated code checking when files are saved, as well as to locally build and run a Docker container for testing
  • Edit config.default.php to allow overriding configuration with environment variables (which is the standard way of setting up simple configuration in Docker containers)
  • Add logging output to index.php to make it easier to see what's going on (and disable Apache's access logging in the Docker container so it doesn't spam up the log)

Additionally:

  • Add GitHub workflows for the following tasks:
    • automatically run code checks on pushes and PRs
    • build and upload Docker images to GitHub Container Registry when a new tag is pushed to the master branch
  • Make the title ID parser case-insensitive - if you have some files where the title IDs are lower-case, or mixed-case, or the base game and updates have different capitalisation, the indexer will now correctly identify and associate them!
  • Fix Some TitleID will crash the program #10 - there are games that don't have values in some of the fields in titles.json or versions.json (e.g. 0100696014F4A000 or 0100E2F014F46000). This would cause the indexer to crash when trying to parse the release date field; now these cases are handled gracefully and parsed sensibly, and the indexer logs a warning about the missing data in the Tinfoil databases!

@proconsule
Copy link
Owner

Thanks fot the commit , it will take some time to review it (i am very busy at the moment)

@fpiesche
Copy link
Author

Sorry the commit history is a bit messy - I did a bunch of this work late in the evening, and of course changes on GitHub workflows especially aren't really a thing one can test without pushing them and running the workflow...

FWIW I'm using the images built from this on my home server now; if you've got Docker to hand you can try them out via the image ghcr.io/fpiesche/nspindexer :)

@dlaventu
Copy link

@fpiesche Thank you! I tried your docker version ghcr.io/fpiesche/nspindexer:2022.08.16 and every little problems I had with the original version are gone! I was unable to rename certain NSZ, the log file would grow infinitly with errors :( Now everything works like it should.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some TitleID will crash the program
3 participants