[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can /tmp/cache/route.cache and other tmp dirs be moved outside proje

From: Nala Ginrut
Subject: Re: Can /tmp/cache/route.cache and other tmp dirs be moved outside project directory?
Date: Sat, 27 Nov 2021 02:43:50 +0800
User-agent: mu4e 1.4.15; emacs 27.1

Hi Mortimer!
First, let me explain the basic idea of (current-toplevel).

If your app folder is /opt/myapp, then the (current-toplevel) is

For something like route.cache, it's an "app constrained" file, so we
use (current-toplevel) to put it to somewhere inside the app
folder. Say, "/opt/myapp/tmp/route.cache".

If we put it to /tmp/, and if you have another Artanis app on the same
machine, it'll interfere. It's normal to exist many Artanis apps in the
same machine (VPS), you can use Nginx for reverse proxying the traffic to
these apps according to different domain name. And the apps should be
isolated safely in their folders.

Now let's back to the issue.
I think the problem is this line:
>            0 (delete-file "/gnu/store/3jbsa6x6wk8g3pzcz59v6abyh4ai8r?")
Usually Guix have a $HOME/.guix directory to put the mutable files.
Could you try to figure out the filename here?

Best regards.

Mortimer Cladwell writes:

> Hi Nala,
> I have an artanis project I am trying to run from guix's /gnu/store....
> I have encountered a problem where some methods e.g. (clean-stuffs) are
> trying to edit the store e.g.:
> ---------------ERROR----------------------------------------------------
> In artanis/commands/work.scm:
>     124:2  2 (init-work)
>     120:2  1 (clean-stuffs)
> In unknown file:
>            0 (delete-file "/gnu/store/3jbsa6x6wk8g3pzcz59v6abyh4ai8r?")
> ERROR: In procedure delete-file:
> In procedure delete-file: Read-only file system
> --------------END
> ERROR----------------------------------------------------------
> Problem is /gnu/store.... is read only.
> Any way to move the tmp directory outside of the store? I can envision an
> artanis.conf parameter "temp-dir" that redirects to e.g. /tmp/cache... or
> maybe $HOME/tmp/cache...
> Also something like modify
> (define route-cache (string-append (current-toplevel)
> "/tmp/cache/route.cache"))
> to
> (define route-cache  "/tmp/cache/route.cache")
> Looking for some input as to where the changes need to be e.g. is it safe
> to globally modify current-toplevel e.g. current-toplevel == "" or
> current-toplevel == $HOME?
> Has anyone had success running an artanis project from /gnu/store...?
> Thanks
> Mortimer

GNU Powered it
GPL Protected it
GOD Blessed it
HFG - NalaGinrut
Fingerprint F53B 4C56 95B5 E4D5 6093 4324 8469 6772 846A 0058

Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]