PrivacyLx / privacylx-issue-tracker

PrivacyLx Issue Tracker repository
0 stars 0 forks source link

Events should expire after the date #58

Closed anadahz closed 4 years ago

anadahz commented 4 years ago

Events on the website should expire right after the end of the event. Currently an old event with date: 2019-11-02T18:00:00 is active and displayed on the homepage.

francisco-core commented 4 years ago

@anadahz I think this has to do with the fact that with the introduction of https://github.com/PrivacyLx/devops/pull/10 the mechanism for updating the website from git changed.

Now it does (check source) in the caddy config file:

{% if caddy_git_interval %}
    interval {{ caddy_git_interval }}
{% endif %}
    repo {{ website_git }}
    args --recursive
    path {{ website_docker_webroot }}
    then hugo --destination={{ website_public }}
    }

And I'm guessing that this tries to pull the git repo but if it doesn't detect changes it doen't execute the then command.

I haven't tested this hypothesis yet.


Temporary solution

Just redeploy the role

Long-term solution

if the issue is in fact the one stated above, then we should add a cron job that redeploys the website. Or another solution.

francisco-core commented 4 years ago

Here's the previous code for the update job. It's the best so we might not use it:

https://github.com/PrivacyLx/devops/blob/5a93112fc60db1cc8e0f3264b4eab776bdec38c9/ansible/roles/caddy-website/tasks/build-website.yml#L104-L111