I've demoed many content management systems over the years that never seemed to match what I wanted for my personal website: Drupal, Habari, Jekyll, Hugo, and a few others.

It came to a point where I wanted to get a site online so I can start adding content to it and worry about the software later. For years I have supported customers on Wordpress, so the obvious choice when (re)creating my blog was what I was most comfortable supporting, and that I've had years of experience with.

The easiest way to create a Wordpress site from scratch is definitely docker. I started out by creating a basic docker-compose file to create MySQL 5.7 and Wordpress containers:

version: '3.3'

services:
   thoattdb:
     image: mysql:5.7
     volumes:
       - thoattdb_data:/var/lib/mysql
     restart: always
     environment:
       MYSQL_RANDOM_ROOT_PASSWORD: '1'
       MYSQL_DATABASE: thoatt
       MYSQL_USER: yadda
       MYSQL_PASSWORD: yaddayaddayadda

   thoattpress:
     depends_on:
       - thoattdb
     image: wordpress:latest
     volumes:
       - thoattpress_data:/var/www/html
       - ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
     ports:
       - "8100:80"
     restart: always
     environment:
       WORDPRESS_DB_HOST: thoattdb:3306
       WORDPRESS_DB_USER: yadda
       WORDPRESS_DB_PASSWORD: yaddayaddayadda
       WORDPRESS_DB_NAME: thoatt

volumes:
    thoattdb_data:
    thoattpress_data:


$ cat uploads.ini
file_uploads = On
memory_limit = 75M
upload_max_filesize = 50M
post_max_size = 50M
max_execution_time = 600

Then with a simple "docker-compose up -d --build", I had a Wordpress site up and running and ready to post to - in all its WYSIWYG glory.

In my normal day-to-day I use markdown quite a bit for documentation. In the past few months, my notes have moved from plaintext scratch files to markdown as well. I wanted to bring markdown into my web posting as well, so I decided to give a different CMS a spin.

There are a few options to go with that let you use markdown to write posts, but the one I've decided to go with is self-hosted Ghost. You can read more about it here. If markdown isn't your thing, it also has a very good WYSIWYG editor.

Onto the new docker-compose config:

version: '3.3'

services:
  thoattghost:
    depends_on:
      - thoattgdb
    image: ghost:4-alpine
    restart: always
    ports:
      - 8101:2368
    environment:
      database__client: mysql
      database__connection__host: thoattgdb
      database__connection__user: yadda
      database__connection__password: yaddayaddayadda
      database__connection__database: thoattgdb
      url: http://thoatt.com
    volumes:
      - thoattghost_data:/var/lib/ghost

  thoattgdb:
    image: mysql:5.7
    volumes:
      - thoattgdb_data:/var/lib/mysql
    restart: always
    environment:
      MYSQL_RANDOM_ROOT_PASSWORD: '1'
      MYSQL_DATABASE: thoattgdb
      MYSQL_USER: yadda
      MYSQL_PASSWORD: yaddayaddayadda

volumes:
  thoattgdb_data:
  thoattghost_data:

Once you run docker-compose, go to domain.com/ghost to create your admin user.

Since I already created a few posts on the Wordpress side, I tried out the "Export to Ghost" features of the Ghost Wordpress plugin. Here's some more information on how to export your data and import them into Ghost: https://ghost.org/docs/tutorials/wordpress-to-ghost/

I've been burned a few times with other various export/import processes, so it was nice to see how well the import did. After importing it seemed as though the posts were simple HTML blocks on the post pages. This would have been fine to leave as-is, but I'm a perfectionist. Since there were only a few posts, I ended up re-creating the existing posts. This also gave me a chance to run the images through riot, and clean up some formatting issues.

All in all I'm happy with the switch over to Ghost. I'm excited to start making some posts in markdown (starting with this one!)