I recently switched to Digital Ocean away from Orangehost and I'm not sure what I'm missing about publishing a local docker to a digital ocean droplet, but when I do, any images I've uploaded to production that don't exist in developement/localhost environment are being deleted on Production even though I don't have the "delete remote files not existing locally" option on, cause it's not even an option, it changes to "clear unused docker images" when I switch to that target. Is it automatically setting the "delete remote files not existing locally" option even though it doesn't appear as a choice? It's really frustrating to make some minor changes to some code, publish and then any images or files I've uploaded in production that aren't in local environment disappear. See example below.
Refresh the production page after publish is complete and the image is gone. Really sucks after I've entered 50 or so and then have to go redo. Not sure what I'm missing about how Wappler works with this.
Docker is containerization. Which means it creates a docker image of the environment which includes everything to run the image, which is turned into a container at runtime. Every time you make updates to your project a new docker image is created. If you don't remove the docker images they build up overtime and take up space on your server.
So let's change terminology from image to graphics. That toggle has nothing to do with the graphics you add to the directory. If you add the graphics to the development server, then they will end up in the production server.
So I'd have to constantly make the changes to the local environment first, then publish to Production? Takes away the purpose of the my app being a CMS if a user can't update the production site without those being messed up if I update and publish code.
Your best/easiest option is to store graphics in object storage (e.g. Digital Ocean spaces or S3) and have a table in your db that references the URL to the image.
Appreciate the replies @kfawcett, but perhaps docker is not for me. Seems like going backwards from the way I'm used to hosting when publishing only changed what I expected would change and update. Seems like extra work.
You have to upload the images to the folder you have configured as "uploads" in your project settings, those are not deleted as are considered "user uploads"
Yeah, for simple sites, Docker could be overkill. It is extremely useful though and storing your images in object storage is ideal as it also helps distribute the files closer to your end users via the built-in CDN.
I'm glad you found that funny, because I was freaking out on your behalf when I saw your first message
I knew this because I know what change Wappler performs to docker-compose.yml file, you can see it in Git, it would be the equivalent of starting with an empty assets folder, everything in the source-code/Git repo in that folder would "vanish". Thankfully I think this is not a destructive operation on localhost
Well, I'm to that point of histerical laughter maybe....haha. It is what it is, luckily this site was only recently launched so I have put it in maintenance mode while I'm going all this testing so the customer data isn't changing.
I can always just wipe the droplet and start fresh with the backed up data.
I'm going to move to a node compatible plesk server that one of my clients, a communications company, has since I have hosted node apps on it and I know it works. Not the fastest solution at the moment, but my site isn't high traffic yet.
Not 100% sure what you are saying.but i think it may be; with docker, the project setting for not uploading on publish (sorry cant remember exact terminology and not near wappler) is very important.
Basically when you deploy to production, the entire site is overwritten EXCEPT the folder tree set in your project settings.
This allows user uploads to be preserved between deploys and also prevents development site images being pushed to production.
Ok, thanks for the clarification, the way my uploads work in this app aren't ideal for Docker and the site being overriden. Plus, it's not a way I'm used to working so I feel this will cause some real problems for me if I'm not careful. I'm moving away from docker on production and will keep for localhost/dev environment cause it's so convenient.
Thanks guys. Sorry to be such a pain with all the questions. Old PHP guy learning new tricks.