pleroma_ctl argument --static-dir #1289

Open
opened 2019-10-01 22:10:07 +00:00 by yalh76 · 9 comments
Member

When generating the config.exs using : su pleroma -s /bin/bash -lc '/var/www/pleroma/pleroma/bin/pleroma_ctl instance gen --force --output /etc/pleroma/config.exs --output-psql /tmp/setup_db.psql --domain test11.yh.yalh.net --instance-name "My_Pleroma" --admin-email yalh@yh01.yh.yalh.net --notify-email yalh@yh01.yh.yalh.net --dbhost localhost --dbname pleroma --dbuser pleroma --dbpass 8d8RlYMl1ZfieGy1nXh9UHcEeAK2YN --rum N --indexable Y --db-configurable Y --uploads-dir /home/yunohost.app/pleroma/storage/uploads --static-dir /home/yunohost.app/pleroma/storage/static --listen-ip 127.0.0.1 --listen-port 8095'
as written in the documentation https://docs-develop.pleroma.social/Mix.Tasks.Pleroma.Instance.html#module-options

There is an error:

589272 DEBUG Writing config to /etc/pleroma/config.exs.
589272 WARNING ** (File.Error) could not make directory (with -p) "/var/lib/pleroma/static": no such file or directory

So it seems that pleroma_ctl doesn't use the argument provided....

When generating the `config.exs` using : `su pleroma -s /bin/bash -lc '/var/www/pleroma/pleroma/bin/pleroma_ctl instance gen --force --output /etc/pleroma/config.exs --output-psql /tmp/setup_db.psql --domain test11.yh.yalh.net --instance-name "My_Pleroma" --admin-email yalh@yh01.yh.yalh.net --notify-email yalh@yh01.yh.yalh.net --dbhost localhost --dbname pleroma --dbuser pleroma --dbpass 8d8RlYMl1ZfieGy1nXh9UHcEeAK2YN --rum N --indexable Y --db-configurable Y --uploads-dir /home/yunohost.app/pleroma/storage/uploads --static-dir /home/yunohost.app/pleroma/storage/static --listen-ip 127.0.0.1 --listen-port 8095'` as written in the documentation https://docs-develop.pleroma.social/Mix.Tasks.Pleroma.Instance.html#module-options There is an error: ``` 589272 DEBUG Writing config to /etc/pleroma/config.exs. 589272 WARNING ** (File.Error) could not make directory (with -p) "/var/lib/pleroma/static": no such file or directory ``` So it seems that pleroma_ctl doesn't use the argument provided....
Owner

Looking through the code I think it actually does, are you sure this warning is relevant when running pleroma and not just a false warning when generating the configuration?

Looking through the code I think it actually does, are you sure this warning is relevant when running pleroma and not just a false warning when generating the configuration?
Author
Member

Well I made some tests and each time the same error.

Last test done on v1.0.91 and I found a way to make it works... #5208

Well I made some tests and each time the same error. Last test done on v1.0.91 and I found a way to make it works... https://git.pleroma.social/pleroma/pleroma/pulls/5208
Author
Member

Well I try to automatically generate the configuration during the installation and I need to have static files stored in a different directory than /var/lib/pleroma/static so /var/lib/pleroma/static doesn't exist...

Well I try to automatically generate the configuration during the installation and I need to have static files stored in a different directory than `/var/lib/pleroma/static` so `/var/lib/pleroma/static` doesn't exist...
Author
Member

@rinpatch sorry for asking, I don't use too, but it seems that pleroma_ctl instance gen ..... --static-dir /home/yunohost.app/pleroma/storage/static ... doesn't use the static dir provided

@rinpatch sorry for asking, I don't use too, but it seems that `pleroma_ctl instance gen ..... --static-dir /home/yunohost.app/pleroma/storage/static ...` doesn't use the static dir provided
Member

It does use it when writing to the config, but doesn't use it for robots.txt generation. It has been reported in #1082. I will try to fix it again.

It does use it when writing to the config, but doesn't use it for robots.txt generation. It has been reported in #1082. I will try to fix it again.
Member

Does it mean this issue could be closed?

Does it mean this issue could be closed?
Author
Member

Unfortunately no, I've tested with pleroma 1.1.6 and pleroma_ctl instance gen still don't use the --static-dir /home/... provided

Unfortunately no, I've tested with pleroma 1.1.6 and `pleroma_ctl instance gen` still don't use the `--static-dir /home/...` provided

Is this still the case?

Is this still the case?
Member

@yalh76 I see the ynh installation script now uses it[1] and it also seem to work when I try locally from source. Can I assume this is fixed?

[1] https://github.com/YunoHost-Apps/pleroma_ynh/blob/master/scripts/install#L207

@yalh76 I see the ynh installation script now uses it[1] and it also seem to work when I try locally from source. Can I assume this is fixed? [1] https://github.com/YunoHost-Apps/pleroma_ynh/blob/master/scripts/install#L207
Sign in to join this conversation.
No milestone
No project
No assignees
6 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pleroma/pleroma#1289
No description provided.