Hardcoded paths #91

Open
opened 2025-12-28 23:26:00 +01:00 by adam · 3 comments
Owner

Originally created by @icovada on GitHub (Dec 28, 2025).

There are many hardcoded paths that force specific folders to be used.
This can cause issues if used as a systemd service with strict permissions or in immutable distros like nixos

Originally created by @icovada on GitHub (Dec 28, 2025). There are many hardcoded paths that force specific folders to be used. This can cause issues if used as a systemd service with strict permissions or in immutable distros like nixos
Author
Owner

@eitchtee commented on GitHub (Dec 28, 2025):

Hey @icovada

Do you have any examples of this? Are you talking about things like /tmp/migrations_complete and /etc/supervisor/conf.d/supervisord.conf or something else?

@eitchtee commented on GitHub (Dec 28, 2025): Hey @icovada Do you have any examples of this? Are you talking about things like `/tmp/migrations_complete` and `/etc/supervisor/conf.d/supervisord.conf` or something else?
Author
Owner

@icovada commented on GitHub (Dec 28, 2025):

I'm talking about things like

63ce57a315/app/WYGIWYH/settings.py (L327)

63ce57a315/app/WYGIWYH/settings.py (L24)

63ce57a315/app/apps/import_app/services/presets.py (L8)

Everything works fine in Docker, but in other cases one might not want to use those paths and instead contain everything inside a single application folder

@icovada commented on GitHub (Dec 28, 2025): I'm talking about things like https://github.com/eitchtee/WYGIWYH/blob/63ce57a315eba694e7dc0b43e9cfec7c4db182bc/app/WYGIWYH/settings.py#L327 https://github.com/eitchtee/WYGIWYH/blob/63ce57a315eba694e7dc0b43e9cfec7c4db182bc/app/WYGIWYH/settings.py#L24 https://github.com/eitchtee/WYGIWYH/blob/63ce57a315eba694e7dc0b43e9cfec7c4db182bc/app/apps/import_app/services/presets.py#L8 Everything works fine in Docker, but in other cases one might not want to use those paths and instead contain everything inside a single application folder
Author
Owner

@eitchtee commented on GitHub (Dec 28, 2025):

I see. Makes sense.

  • /usr/src/app/import_presets could be a relative path, since it's just accessing the import_presets folder inside the application folder
  • BASE_DIR and ROOT_DIR is technically only traversing the file path from settings.py to the ./app/ folder, so I don't think it will cause issues
  • The cache LOCATION could be defined with an env var? It doesn't particularly matter where it is located, as long as it is accessible

Let me know if you need any help on this.

@eitchtee commented on GitHub (Dec 28, 2025): I see. Makes sense. - `/usr/src/app/import_presets` could be a relative path, since it's just accessing the import_presets folder inside the application folder - BASE_DIR and ROOT_DIR is technically only traversing the file path from settings.py to the ./app/ folder, so I don't think it will cause issues - The cache LOCATION could be defined with an env var? It doesn't particularly matter where it is located, as long as it is accessible Let me know if you need any help on this.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/WYGIWYH#91