Repository navigation
Add pre-build Docker images through GHCR - #217
Conversation
The next page arrow did not work but is now fixed. Also remove the sorting functionality since it does not work.
If you create a CTF which is in the past, it would appear at the bottom of the past CTF table until you refresh the table. Now the list is properly sorted which will place the CTF at the expected place.
This was newly added to the challenge categories as listed at https://ctf.hackthebox.com/api/public/challengeCategories
The graphql-upload packages has been swapped with graphql-upload-ts, because it is not possible anymore to use graphql-upload due to import issues.
The SCSS variables are from quasarframework/quasar#15144 (comment) This fixes the ugly dark shadows in dark mode but keeps the shadows in light mode. This was added in Quasar 2.11 but reverted using the SCSS patch. Due to an update of ESLint, it complains about single-word components. Since this is used in CTFNote, this rule is disabeld. Also some small (automatic) fixes.
It expects undefined officially, so we return that instead.
Docker images of the front, api and db will be automatically build through Github workflows and pushed to the Github Container Registry (GHCR) when a commit is made to the main branch (or when manually triggered). This makes it possible to install CTFNote on a VPS of 2 GB of RAM since you don't need to build the container anymore (which requires quite a lot of RAM). Building the container yourself is still possible and the default setup for docker compose. The README is updated with this change. Futhermore, the REAMDE now points to `docker compose` instead of the deprecated `docker-compose`.
…images-through-ghcr
…images-through-ghcr
This workflow is very similar to the Hedgedoc GHCR workflow: https://github.com/hedgedoc/hedgedoc/blob/develop/.github/workflows/docker.yml However, there are some slight changes.
Thanks to anthares101 for providing the solution in their fork! https://github.com/anthares101/CTFNote/commit/b1c3608e85635309f05b073c784c1d4790ac4a10
This should now tag latest, the branch and all the tagged versions and build and store their docker images.
This skips the merging step for testing this out.
The `--pull always` makes sure that the image is updated when executed again.
Was only used for testing purposes.
|
@XeR, would it be possible to revert to merge commits again for merging the PRs? Fast forwarding messes up the commits in the fork (see above commits which are getting marked as new but do not add any content). Furthermore, the network overview in GitHub is wrong since there is no explicit merge done (thus not showing my branches merging into the upstream branch). Unless you highly prefer fast forwarding, merge commits would make it easier for me to contribute to the project :) |
XeR
left a comment
There was a problem hiding this comment.
I'm trusting you blindly on this new yaml file. If it works for your repo, it'll probably work here too
Sure ! |
As discussed in #211, I have created the following:
latest, by the branch name and by tagdocker-compose.prebuild.ymlis provided which extends the originaldocker-compose.ymlto use the pre-build images from GHCR. This gives the option to the user to build the images themself too.It is not possible to test this PR before merging. However, you can look at the packages of my fork to see the results. Please note that you should enable the package view on the homepage manually in GitHub through the settings icon (also used to change the description of the project).
For now it is only GHCR because that is the easiest to implement and does not require you to setup secrets. In the near future (as soon as we have fully decided which external Docker hosting platform we are going to use), it is almost trivial to add this as a target too due to the
docker/metadata-actionstep.