web-app-openproject: upgrade to OpenProject 15

- bumped image version from 14 to 15
- removed dedicated migration task (now handled by upstream entrypoints)
- renamed tasks for cleaner numbering:
  * 02_settings.yml → 01_settings.yml
  * 03_ldap.yml → 02_ldap.yml
  * 04_admin.yml → 03_admin.yml

Ref: https://chatgpt.com/share/68d57770-2430-800f-ae53-e7eda6993a8d
This commit is contained in:
2025-09-25 19:39:45 +02:00
parent f55b0ca797
commit a26538d1b3
6 changed files with 4 additions and 23 deletions

View File

@@ -0,0 +1,30 @@
- name: Ensure administrator user exists and is admin
shell: >
docker compose exec web bash -c "
cd /app &&
RAILS_ENV={{ ENVIRONMENT | lower }} bundle exec rails runner \"
u = User.find_by(login: '{{ OPENPROJECT_ADMINISTRATOR_USERNAME }}')
if u.nil?
u = User.new(
login: '{{ OPENPROJECT_ADMINISTRATOR_USERNAME }}',
mail: '{{ OPENPROJECT_ADMINISTRATOR_EMAIL }}',
firstname: 'Admin',
lastname: 'User',
password: '{{ OPENPROJECT_ADMINISTRATOR_PASSWORD }}',
password_confirmation: '{{ OPENPROJECT_ADMINISTRATOR_PASSWORD }}'
)
u.admin = true
u.save!
puts 'Administrator {{ OPENPROJECT_ADMINISTRATOR_USERNAME }} created and set as admin.'
else
u.admin = true
u.save!
puts 'User {{ OPENPROJECT_ADMINISTRATOR_USERNAME }} updated to admin.'
end
\"
"
args:
chdir: "{{ docker_compose.directories.instance }}"
async: "{{ ASYNC_TIME if ASYNC_ENABLED | bool else omit }}"
poll: "{{ ASYNC_POLL if ASYNC_ENABLED | bool else omit }}"
no_log: "{{ MASK_CREDENTIALS_IN_LOGS | bool }}"