Skip to content

Draft: Add dockerfile for easier local testing

The first part of the merge request is simply updating the docs and removing cruft from the config files. I will make a separate merge request with this commit since it also helps other contributors.

  • The apache test configs were out of date and full of things that were not used anymore like mod_perl. It was also very much different from the production one. Tried to make it to match the production one and removed all cruft from it.
  • Updated the docs and moved local testing to a separate section.
  • Tested the new instructions on buster and bullseye.

The second part is making everything work inside Docker. It does work, but it is not pretty because of the way things are structured inside the project (no way to split build scripts from runtime scripts). Currently, it serves my purpose of aiding me to quickly setup and run everything, but I do plan to split the perl files that are used in creating the db and static sites from the ones that are used at runtime in order to decrease build times and also separate concerns.

Other future plans for this MR include (contributions welcome):

  • create some tests for the code; Currently there is no way of knowing if the whole thing works as intended or not. A simple test db and curl requests would give us at least some sort of guarantee of not breaking anything that is working.
  • optimize the docker build cache for the large archives it downloads (it is kinda working, but is wonky at times)
  • maybe use the salsa image registry to push the already indexed db, this will cut the build times immensely and spare us from downloading the whole of the archive everytime
  • figure out how to use the salsa ci/cd to run the tests

Merge request reports

Loading