internetstandards / Internet.nl

Internet standards compliance test suite
https://internet.nl
174 stars 37 forks source link

Deploying from a forked repository - Builds summary docs - Erroneous deployment commands #1316

Closed apio-sys closed 6 months ago

apio-sys commented 6 months ago

Following the documentation/Docker-forked.md document to deploy from own fork, I noted an issue with the docs build summary like so:

Screenshot from 2024-03-10 13-04-08

That won't work if you copy/paste that code. If you change manually:

Lines 1 - 7:     \\ > \
Lines 5 & 6:     \$BRANCH/ > ${BRANCH}
Lines 7 & 8:     \$RELEASE > $RELEASE
Lines 7 & 8:     \$DOCKER_REGISTRY > $DOCKER_REGISTRY

The commands work as expected. So I have my forked branch working which I'm planning to translate to French and restyle the front a bit. However the documentation/Customize.md doc dates from a few years ago and I think is not really applicable anymore to the dockerized version? Should I raise a discussion for this part?

Kind regards,

Joris.

mxsasha commented 6 months ago

Hmm, that looks like a bug specific to forked builds, but probably not too hard to fix. @aequitas do you have time to have a look?

And yes, some of that customisation documentation is probably out of date. We don't have much recent experience with it either. There are a few people trying out some customisations right now, perhaps they can contribute their experiences there.

aequitas commented 6 months ago

@apio-sys It think you are looking at the wrong place.

Instead of looking in the build output itself you should go to the "docs summary" entry on the "Summary" page. Like here: https://github.com/aequitas/Internet.nl/actions/runs/7460649489#summary-20299184191

apio-sys commented 6 months ago

Thanks @aequitas . Indeed, I was looking in the wrong place. In docs summary the commands to copy/paste do show correct. Thanks for that. So that closes this ticket.

Would he happy to exchnage with other people trying out customizations. I'm looking into implementating a french version but I'm already a bit lost even integrating my translations/fr/main.po file. Shouldn't a new language be "picked up" dynamically in interface/templates/base.html or should I declare it somewhere first?

mxsasha commented 6 months ago

Would he happy to exchnage with other people trying out customizations. I'm looking into implementating a french version but I'm already a bit lost even integrating my translations/fr/main.po file. Shouldn't a new language be "picked up" dynamically in interface/templates/base.html or should I declare it somewhere first?

We have not tried this, but there is at least a hardcoded list in settings.py.

apio-sys commented 6 months ago

Thanks @mxsasha that's a good start indeed. I now have my top menu language entry (on https://conformite-internet.fr/) so I can start translating with that. The DNS records where already prepared but the certificate didn't get created for that subdomain. Is there another area where the certificates need to be hardcoded maybe?

mxsasha commented 6 months ago

Yes, they're also in https://github.com/internetstandards/Internet.nl/blob/main/docker/webserver/certbot.sh#L31-L33 - no others that I know of, but there may be.

apio-sys commented 6 months ago

Thanks, indeed that seems to be the starting point. I have updated certbot.sh with the additional subdomains. It seems clear enough that that should suffice to expand the certificate using the new subdomains after this bit:

  # update certificate with subdomains if domain is configured and subdomains have changed or are not configured yet
  if [ -f /etc/letsencrypt/renewal/$domain.conf ] && [ ! "$(cat /etc/letsencrypt/.subdomains-configured)" = "$subdomains" ]; then

but it doesn't do so. The files in here: /var/lib/docker/volumes/internetnl-prod_certbot-config/_data remain unchanged when restarting. I tried to delete from the the previous certificate files from archive/ live/ and renewal/ and upon restart it then recreates them but using the previous subdomains, not the new list. I also tried to remove the .subdomains-configured but then it doesn't get's recreated and only the main domain then get's recreated... I'm probably missing something simple but can't figure it out (and only 5 attempts to redo the LE commands...).

Maybe we should move this to a discussion zone regarding customization since it's getting off the initial topic now.

apio-sys commented 6 months ago

OK I noticed some hardcoded language references in the Nginx configuration file as well webserver/nginx_templates/app.conf.template . Once added, the certifcates now work for all 3 languages. Once I clean up my notes, I shall endeavour to propose some more content in the customization doc. I'll close this one here not to get miwed up with the original subjects. Thanks again for pointing me in the right direction.