is there any reason why resources are split in a prod deployment between (/home/app/)`target/resources/` (of which there is only 1 file, at least in my case: target/resources/public/css/main.css), and (/home/app/)`resources/` (which is the main bulk of the public files)?
# tree target/ resources/
target/
└── resources
└── public
└── css
└── main.css
resources/
├── config.edn
├── config.template.env
├── fixtures.edn
├── public
│ ├── android-chrome-192x192.png
│ ├── android-chrome-512x512.png
│ ├── apple-touch-icon.png
│ ├── browserconfig.xml
│ ├── favicon-16x16.png
│ ├── favicon-32x32.png
│ ├── favicon.ico
│ ├── img
│ │ ├── eel.svg
│ │ ├── glider.png
│ │ └── logo.png
│ ├── js
│ │ └── main.js
│ ├── mstile-144x144.png
│ ├── mstile-150x150.png
│ ├── mstile-310x150.png
│ ├── mstile-310x310.png
│ ├── mstile-70x70.png
│ ├── safari-pinned-tab.svg
│ └── site.webmanifest
├── tailwind.config.js
└── tailwind.css
8 directories, 24 filesdigging further, /target is in gitignore, and it would make sense for the generated css file by tailwind; but is there any other file? It just seems like a less-than-ideal setup for nginx (as per server-setup.sh) to currently basically do try_files in 2 locations, just for that one single file
yeah, target is for generated files. I think the css file is the only one by default. if you use https://biffweb.com/docs/reference/static-files/ then the html files will go there too. also cljs output, if you start using that. if you're concerned about the nginx overhead, you can change the https://github.com/jacobobryant/biff/blob/96f2e74473d0d2b71bafddc4ef9172796d0619ec/starter/resources/config.edn#L40 option, add that path to your .gitignore, then edit the nginx try_files config.
yes, why didnt I think of that... think_beret thank you! (and thank you for answering the qn about what other files might go there too. Thank you!)
is editing resources/config.edn (at least on the clojure side) all that's needed? I see references to main.css in css-path in src/com/eelchat/ui.clj, but I'm not sure how that works in terms of knowing to look under target/ instead of resources/
or is :paths that magic thing that does this in deps.edn?
I believe that's all that's needed--yep, thanks to :paths, the app doesn't care whether files are in resources or target/resources
great. Again, thank you!!
any time!
I converted my local todo list into a public roadmap: https://github.com/users/jacobobryant/projects/2/views/1
if you're looking for technical reviewers for help with 9, I'd like to volunteer as one 🙂. I am a technical reviewer for a well-known publisher.
that'd be great! it will be... a while before I get to that one most likely