Showing posts with label images. Show all posts
Showing posts with label images. Show all posts

Wednesday, June 19, 2024

Docker, Wordpress, and Linode

Maybe a week ago, I decided to refresh my Linode instance.  I'd been using Ubuntu 16.04 LTS on it the past 10 years.  16.04 has been unsupported for quite a while now, but I was being lazy while still watching the server for possible compromises (the server was locked down very well).

Initially, I'd planned on a slow rollover to Ubuntu 24.04 LTS, by deploying a new host and slowly migrating over to it from the old server.  One day, I just said, "fuck it" and started from scratch.  I kept my old disk volume and mounted it to the new host so that I could grab old data whenever I needed it...having config files from the old host would help me when reinstalling the software I was using on the old host.

The plan was to migrate my two Wordpress sites to the new host but today I tried running Wordpress on Docker on an old Dell XPS 8930 and it worked well.  I first tried to just get to the point where Wordpress could install onto it.  I then tried to restore a backup of one Wordpress site onto the Dockerized Wordpress instance and I was immediately successful.  It happened so quickly that I spent the rest of the day testing it, to the point that I decided to do the same thing on the 24.04 server tonight.  It's now up and running and I've already been posting to it.  I'll monitor it the next few days and will probably back it up, tear down the whole thing, and then try some different setups, such as trying to run both Wordpress sites from one set of containers (the problem is, I need both Wordpress sites to be serving on port 80 and there's only one port 80 on the server.

Currently the setup is using three small containers (one for MySQL, one for Wordpress, and one for phpmyadmin).  I leveraged the YAML files of two other nerds, using both to build my own YAML file, which I used to pull the images and configure the containers.  I ran in to issues more than a few times, but between what I learned last year on acloud.guru and trial and error, it wasn't all that difficult.  What I haven't done (YET) is build my own dockerfiles.

I usually also use the Linode host as a file server (sharing pictures with friends and forums), and I was doing that using Apache, so that's a 3rd application that I'd need to use port 80...not sure how I'm going to set all this up, but the neat thing about Docker is that I can blow it away and start over (keeping my .yml compose files to work with and tweak), again and again, until I get it right.

This was the first time outside of training that I used Docker and I honestly should've been using it a long time ago.

I actually had a lot of fun doing this.

UPDATE (7/28/2024):

I'm having some issues trying to determine how to host two sites on one Dockerized Wordpress setup.  I can probably use the muti-site Wordpress setup but I need to study up on how to alter the wp-config file using the docker-compose.yml file.

Or, I can probably just run two Docker setups, one for my firearms blog and one for my car blog.

I also want to be able to share my many pictures and files using Apache, but found that I can't run Apache AND Worpdress, as both use port 80.  I may have to use some type of proxying.

Lastly, I can just reinstalled Wordpress in a non-Dockerized fashion, while experimenting with Wordpress in Docker.  This is probably the more reasonable approach, as I can study up how to leverage Docker at my own leisure but have a production native Wordpress setup.

Saturday, August 13, 2022

MacOS and Smart Folders

Below are my notes from learning a bit about smart folders in MacOS.


Copied from a Notes entry:


8/3/2022 - Smart Folders


I want to better organize my photos and videos (that are stored in Photos and currently shared to iCloud).


I also wanted to try using Smart Folders.


I’ve also never backed up my photos, so I got the idea that I could save my photos as a backup, while also sorting them (Photos contains both videos and photos), and also removing duplicate photos.


  • I copied all of the photos and videos to my Extreme Pro SSD
    • I copied all the files to PNG format.
    • Several of these files are actually videos (.mov), which I coped as well.
  • I then created two smart folders
    • A smart folder for images (PNG)
    • A smart folder for movies (MOV)


One thing I had a problem with is determining how to get the smart folders to only search a certain drive.  By default, when created smart folders, the criteria is set to search the native SSD.  I couldn’t find a way to change this to search against the Extreme Pro.


I decided to cheat by assigning all the files on the Extreme Pro SSD the following tag:  Extreme Pro.  If they were photos, I added the “photos” tag and if they were movies, I added the “movie”, “quicktime”, and “video” tags. 


I noticed that there are many duplicates of photos (they’re appended with (1), (2)…).  I need to study up on how to use smart folders to eliminate the duplicates (if possible).


https://osxdaily.com/2020/09/17/how-find-duplicate-files-mac/ can help with this.


Once I get the duplicates removed, I’ll need to go through them and get rid of any needless photos/videos.  The plan is to archive them all, as well as not have them taking up iCloud space and hard drive space on both the Mini and MBA. 


I also couldn’t find a way to refine an existing smart folder’s name, so I created a new one and gave it the name I needed, then saved it.  I then had the problem of having the original smart folder and couldn’t find out how to delete it.  The following URL helped to delete that folder:  https://www.wikihow.com/Remove-an-Item-from-the-Finder-Sidebar-on-a-Mac.


8/4/2022 - Smart Folders 2


After watching a few videos on Youtube about how to create searches and saving the searches as smart folders, I did the following:


  1. Opened new Finder window
  2. Used Cmd+F (to find files)
  3. Chose the following as “Search:” - Extreme Pro
  4. Searched for File extension =  PNG
  5. Saved as “Photos - Extreme Pro”
  6. The above resulted in saving the search as a smart folder.