Image Management - Docker

In general, does anyone store images in a database or just in a folder?

In Docker containers, are the images downloaded and then overwrite images stored in the local folders?

Very bad practice to store images to your database. Best to simply store the path/link to the image, and have the images themselves reside within a directory within the Project directory itself. With regards to overwriting your images all depends on how you store and name them. Some provide a directory per user for example, and store all that users images in ‘their’ directory. Others store all images in a single directory. Some rename their images on upload (naming conventions can be set in Server Connect), others may select to upload the image ‘as-is’ and may not rename. Regardless Wappler covers both scenarios. Then there is the option to store to Amazon S3 Storage and use Buckets as your storage using Wapplers built-in S3 connection options. Very affordable and very simple. Lots of options available depending on what you wish to accomplish…

4 Likes

S3 solve a lot of problems!!

1 Like

I started looking there last week, but I wasn’t to accepting of the bucket/container world. I’m enjoying the push button aspect of Wappler deploying to Digital Ocean. What I’m missing is the confront of my old PHP/FTP mentality.

Old dog - growling and barking all the way into containerland.

Example right now I’d like to see whats being added to the database on the remote host - old world fire of Navicat done in a minute - new world - still trying to see if I can even make a remote connection with Navicat. I have Navicat working locally - sorry I degress…

Back on topic - what about the delay of an S3 reaching out from a Docker container? cost?

Negligible delay, super fast as you would expect with AWS. Cost wise, see the following pricing chart (also a free tier is available, and set by default, but can’t remember the capacity), we have TB’s of files on S3 and pay a few Dollars a month (you do need a Credit Card to register):

1 Like

Interesting… Thanks

We were very hesitant and sceptical about adopting AWS S3 as our primary storage, initially. To be honest I wish we had implemented their services a lot earlier (specifically storage services).

2 Likes

Thanks Dave - well, I’ve jumped in and loaded my images to AWS. That was to easy. Connected with an S3 provider, just need to work on placing the filename and proper syntax in the dynamic attribute. I’ve been thinking too, I might try DO spaces since that’s where I’m hosting the Docker file.

1 Like

I have my test app running in a Digital Ocean Droplet and the images are stored on a Digital Ocean space…
No problems and it is working really great.

Digital Ocean Space come with CDN included in the price.

Also wasabi.com is convenient, depending your needs.

I’m having a heck of a time with Spaces. I’ve gotten the S3 List to work, but I can’t get it to put an image up there. I’m using NodeJS server. Did you have to modify the instructions at all?

@jimed99 in the Globals s3 you create the connection
And in the steps in an api you use ‘put file’ to upload it to the DO spaces


1 Like

I can confirm a that my server connection is correct because I can get a listing of the folder on both AWS and S3 following this: https://docs.wappler.io/t/using-s3-connector/23623#Listing-Files-from-a-Bucket

I followed this document: Using App Connect S3 Upload.
It’s a different in v4.x than when these instructions were written. It states using the S3 Upload Control it does not require a form. These instructions left me with to many questions and frustrations this week as they provided not real insight to define the details of the key and path sources in this scenario.

Your screen shoots prompted me to a bit more research and I found a form option within this doc https://docs.wappler.io/t/using-s3-connector/23623#Listing-Files-from-a-Bucket . I deploy to the DO server and get a 500 Internal server error. I get from this error from the developers console in chrome. Not sure how to troubleshoot the rest of this. Thanks for the responses.

I haven’t used the S3 upload element like in the document you stated. So I cannot help you with that. I am just using a form to upload an image and let the api push it to the cloud space.

1 Like