Skip to content

Comments

Fix database persistence by wiring entrypoint_fixdb.sh into Dockerfile#94

Draft
Copilot wants to merge 2 commits intodevfrom
copilot/fix-config-files-location
Draft

Fix database persistence by wiring entrypoint_fixdb.sh into Dockerfile#94
Copilot wants to merge 2 commits intodevfrom
copilot/fix-config-files-location

Conversation

Copy link
Contributor

Copilot AI commented Feb 18, 2026

Database files (tuners.db, users.db) were created in /app rather than /app/config, causing config loss on container restarts despite /app/config volume mounts.

Changes

  • Updated Dockerfile to copy and execute docker/entrypoint_fixdb.sh as entrypoint
  • Script creates symlinks: /app/.db → /app/config/.db
  • Maintains tini for signal handling: ENTRYPOINT ["/usr/bin/tini", "--", "/entrypoint_fixdb.sh"]

Context

The entrypoint script already existed and was used in docker-compose.yml, but wasn't integrated into the base Dockerfile. This meant direct image builds (without compose) lacked the fix.

The script handles migration of any existing databases from /app to /app/config before creating symlinks.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • iptv.lan
    • Triggering command: /usr/local/bin/python python app.py (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>[BUG] Config files are saved in wrong location</issue_title>
<issue_description>In my Docker setup, I have the /app/config, /app/logs, etc directories mapped to persistent volumes.
It appears as though the tuner and user configuration is saved in the /app directory, thus every time I restart the container my config is lost.
Can you verify that config settings, such as tuners.db are saved in the /app/config directory?

ls -al
total 239
drwxr-xr-x 1 root root 506 Jan 9 09:27 .
drwxr-xr-x 1 root root 158 Jan 8 18:56 ..
drwxr-xr-x 1 root root 164 Jan 3 22:07 .git
drwxr-xr-x 1 root root 18 Jan 3 22:07 .github
-rw-r--r-- 1 root root 225 Jan 3 22:07 .gitignore
-rw-r--r-- 1 root root 16902 Jan 3 22:07 CHANGELOG.md
-rw-r--r-- 1 root root 1776 Jan 3 22:07 Dockerfile
-rw-r--r-- 1 root root 3864 Jan 3 22:07 INSTALL.md
-rw-r--r-- 1 root root 127 Jan 3 22:07 LICENSE
-rw-r--r-- 1 root root 5568 Jan 3 22:07 README.md
-rw-r--r-- 1 root root 4784 Jan 3 22:07 ROADMAP.md
-rw-r--r-- 1 root root 70244 Jan 3 22:07 app.py
-rw-r--r-- 1 root root 8945 Jan 3 22:07 bump_version.py
drwxr-xr-x 1 99 users 2 Jan 3 17:02 config
drwxr-xr-x 1 99 users 2 Jan 3 17:02 data
drwxr-xr-x 1 root root 120 Jan 3 22:07 docker
drwxr-xr-x 1 root root 22 Jan 3 22:07 docs
drwxr-xr-x 1 99 users 2 Jan 3 17:02 logs
-rw-r--r-- 1 root root 27 Jan 3 22:07 requirements.txt
-rw-r--r-- 1 root root 12053 Jan 3 22:07 retroiptv_linux.sh
-rw-r--r-- 1 root root 13636 Jan 3 22:07 retroiptv_rpi.sh
-rw-r--r-- 1 root root 6747 Jan 3 22:07 retroiptv_windows.bat
-rw-r--r-- 1 root root 20040 Jan 3 22:07 retroiptv_windows.ps1
drwxr-xr-x 1 root root 38 Jan 3 22:07 static
drwxr-xr-x 1 root root 228 Jan 3 22:07 templates
drwxr-xr-x 1 root root 38 Jan 3 22:07 tests
-rw-r--r-- 1 root root 20480 Jan 9 09:27 tuners.db
-rw-r--r-- 1 root root 16384 Jan 8 18:56 users.db</issue_description>

<agent_instructions>Look at the entire thread before creating a plan.</agent_instructions>

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

@thehack904 That is odd. Can you run the following commands and post the results?

This should find where the DBs actually live:
docker exec -it <container_name> sh -lc 'ls -la /config /data /app 2>/dev/null; echo; find / -maxdepth 4 -type f ( -name "tuners.db" -o -name "users.db" -o -name "*.db" ) 2>/dev/null'

also useful: show the newest DB-ish files anywhere under /app, /config, /data:
docker exec -it <container_name> sh -lc 'for d in /app /config /data; do echo "== $d =="; ls -lt "$d" 2>/dev/null | head -n 50; echo; done'

@thehack904 Updated and added entrypoint_fixdb.sh that creates persistent /app/users.db → symlink to /app/config/users.db /app/tuners.db → symlink to /app/config/tuners.db

to hold changes upon restart</comment_new>


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@thehack904 thehack904 changed the base branch from main to dev February 18, 2026 01:37
Co-authored-by: thehack904 <35552907+thehack904@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix config files saving to wrong location Fix database persistence by wiring entrypoint_fixdb.sh into Dockerfile Feb 18, 2026
Copilot AI requested a review from thehack904 February 18, 2026 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Config files are saved in wrong location

2 participants