I'm running an Astro site on a VPS using Coolify, and I need to access some images stored in an external mounted directory at /mnt/disk. This directory is linked to the Docker container at /external. I've tried various methods to import these images for use with Astro's component, including: 1) using a relative path to ../external, 2) binding /external inside /app/src/assets/, and 3) symlinking /external to /app/src/assets/external. However, none of these approaches work in production, even though I can see the images in the Docker mount and can browse them through the /public directory. I've also experimented with different configurations in my Astro and tsconfig.json, but nothing seems to solve the issue. I'm hoping someone here can offer some insights.
1 Answer
I found a workaround! Instead of symlinking, I set up a separate Nginx container to host the images, and now I can access them remotely in my Astro app. It’s working much better this way!
Related Questions
Cloudflare Origin SSL Certificate Setup Guide
How To Effectively Monetize A Site With Ads