Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 5, 2025

✍️ Description

AdventureLog installation fails during Django migrations with ProgrammingError: keine Berechtigung, um Erweiterung »postgis« zu erzeugen (no permission to create extension 'postgis'). Django attempts to create the extension as non-superuser adventurelog_user, which lacks privileges.

Changes

install/adventurelog-install.sh

  • Added PG_DB_EXTENSIONS="postgis" to setup_postgresql_db call, ensuring extension creation by postgres superuser during initial database setup

ct/adventurelog.sh

  • Added extension check in update_script() before migrations, protecting against update failures on installations created before this fix
# Before
PG_DB_NAME="adventurelog_db" PG_DB_USER="adventurelog_user" setup_postgresql_db

# After
PG_DB_NAME="adventurelog_db" PG_DB_USER="adventurelog_user" PG_DB_EXTENSIONS="postgis" setup_postgresql_db

🔗 Related PR / Issue

Link: Per agent instructions in issue

✅ Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to website-related JSON files or metadata.
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.
Original prompt

This section details on the original issue you should resolve

<issue_title>Adventurelog can't install with default settings</issue_title>
<issue_description>### ✅ Have you read and understood the above guidelines?

yes

🔎 Did you run the script with verbose mode enabled?

Yes, verbose mode was enabled and the output is included below

📜 What is the name of the script you are using?

adventurelog

📂 What was the exact command used to execute the script?

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/adventurelog.sh)"

⚙️ What settings are you using?

  • Default Settings
  • Advanced Settings

🖥️ Which Linux distribution are you using?

Debian 13

📈 Which Proxmox version are you on?

PVE Version 9.1.2 (Kernel: 6.17.2-2-pve)

📝 Provide a clear and concise description of the issue.

⚙️ Using Default Settings on node pve
💡 PVE Version 9.1.2 (Kernel: 6.17.2-2-pve)
🆔 Container ID: 139
🖥️ Operating System: debian (13)
📦 Container Type: Unprivileged
💾 Disk Size: 7 GB
🧠 CPU Cores: 2
🛠️ RAM Size: 2048 MiB
🚀 Creating a AdventureLog LXC using the above default settings

✔️ Storage local (Free: 66,9GB Used: 24,8GB) [Template]
✔️ Storage local-lvm (Free: 1,2TB Used: 409,6GB) [Container]
✔️ Storage 'local-lvm' (lvmthin) validated
✔️ Template storage 'local' validated
✔️ Cluster is quorate
✔️ Template search completed
✔️ Template debian-13-standard_13.1-2_amd64.tar.zst [online]
✔️ LXC Container 139 was successfully created.
✔️ Started LXC Container
✔️ Network in LXC is reachable (ping)
✔️ Customized LXC Container
✔️ Set up Container OS
✔️ Network Connected: 192.168.176.154
✔️ IPv4 Internet Connected
✖️ IPv6 Internet Not Connected
✔️ Git DNS: github.com:(✔️ ) raw.githubusercontent.com:(✔️ ) api.github.com:(✔️ ) git.community-scripts.org:(✔️ )
✔️ Updated Container OS
✔️ Installed Dependencies
✔️ Python 3.13 installed
✔️ Setup uv 0.9.15
✔️ Setup Node.js 22
✔️ Installed Node.js modules: pnpm@latest
✔️ Setup PostgreSQL 17
✔️ Set up PostgreSQL Database
✔️ Deployed: adventurelog (0.11.0)
✖️ in line 66: exit code 1 (General error / Operation not permitted)
→ /opt/adventurelog/backend/server/.venv/bin/python -m manage migrate
--- Last 10 lines of silent log ---
with self.db.wrap_database_errors:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/adventurelog/backend/server/.venv/lib/python3.13/site-packages/django/db/utils.py", line 91, in exit
raise dj_exc_value.with_traceback(traceback) from exc_value
File "/opt/adventurelog/backend/server/.venv/lib/python3.13/site-packages/django/db/backends/utils.py", line 103, in _execute
return self.cursor.execute(sql)
~~~~~~~~~~~~~~~~~~~^^^^^
django.db.utils.ProgrammingError: FEHLER: keine Berechtigung, um Erweiterung »postgis« zu erzeugen
HINT: Nur Superuser können diese Erweiterung anlegen.


📋 View full log (14805 lines): /root/.install-f4c5380d.log
✖️ Installation failed in container 139 (exit code: 1)

✔ Installation log: /tmp/install-lxc-139-f4c5380d.log

Remove broken container 139? (Y/n) [auto-remove in 60s]: n

Container 139 kept for d

🔄 Steps to reproduce the issue.

Tried again but error keeps

❌ Paste the full error output (if available).

see top

🖼️ Additional context (optional).

No response</issue_description>

<agent_instructions>add PG_DB_EXTENSIONS="postgis" in installer and in update_script </agent_instructions>

Comments on the Issue (you are @copilot in this section)

@MickLesk Cloudflare is currently down at some Pages. Maybe try again in some hours

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fix Adventurelog installation with default settings Fix AdventureLog installation failure: missing postgis extension permissions Dec 5, 2025
Copilot AI requested a review from MickLesk December 5, 2025 11:52
@MickLesk MickLesk marked this pull request as ready for review December 5, 2025 11:53
@MickLesk MickLesk requested a review from a team as a code owner December 5, 2025 11:53
@github-actions github-actions bot added update script A change that updates a script bugfix labels Dec 5, 2025
@michelroegl-brunner michelroegl-brunner merged commit 86491da into main Dec 5, 2025
7 checks passed
probers1 pushed a commit to probers1/ProxmoxVE that referenced this pull request Dec 5, 2025
…issions (community-scripts#9674)

* Initial plan

* Add PG_DB_EXTENSIONS="postgis" to fix installation error

Co-authored-by: MickLesk <[email protected]>

---------

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: MickLesk <[email protected]>
@MickLesk MickLesk deleted the copilot/fix-adventurelog-installation-issue branch December 8, 2025 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix update script A change that updates a script

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Adventurelog can't install with default settings

4 participants