Easy switch to maintenance page #350
Labels
No Label
administration
Akkoma
Android
Bare metal
bug
Communication
Community
Cryptpad
Discussion
Documentation
duplicate
enhancement
etherpad
Feature request
Feedback
finances
Fixed
forgejo
fun_project
Goal 2024
help wanted
Howto
🤔️ Investigate
ios
jitsi
lacre
Lacre Test
ldap
Lemmy
LibreTranslate
low prio
Lufi
macos
Mail
Merch
monitoring
movim
needs_refine
New Auth
Nextcloud
nice to have
on hold
proposal
question
Ready
refined
Roundcube
searX
spam-protection
Staging Server
Themes
TOR
Urgent!
Website
windows
wontfix
xmpp
Yearly Report
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Disroot/Disroot-Project#350
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
We used to use ansible to switch template to maintenance when we wanted a service to not be accessible. This works well for cases where service is planned to be in maintenance mode for long time.
However we should have an easy way to load site in maintenance without the need for PR/approval process.
I can think of two ways:
Use ansible role as is and add in host_vars extra vhosts (eg. gitea.maintenance) that arent enabled but have all the info such as root pointing to general maintenance page, having all needed certificates etc).
Add task to nginx that will deploy maintenance vhost (eg. gitea.maintenance) as above, if
item.maintenance: 'true'
for vhost is set.If we need to switch service to maintenance mode, we just need to remove the current link to
sites-enabled
and create new link linking togitea.maintenance
vhost. When maintnenance mode is not needed, we either run playbook on proxy servers or change the link back.Option 1. adds more vhosts in host_vars but doesnt touch the role while the option 2. requires just extra attribute to host_vars but requires extra task on the role.
I'd go for solution 2, it seems to me that it will keep host_vars cleaner (in the sense of less vhost)
done. PR pending Disroot-Ansible/nginx#35