As of writing, I have two blogs up and running. A new blog with hostname blog-test.aaronlenoir.com running on Ghost 2 and blog.aaronlenoir.com running on Ghost 1.

To switch hostnames, it should be fairly easy. Here's the two entries that need changing in docker-compose.yml

  ...
  ghost:
    image: ghost:1-alpine
    restart: always
    depends_on:
      - "nginx-proxy"
    ports:
      - 127.0.0.1:8080:2368
    volumes:
      - ./blog/data/ghost:/var/lib/ghost/content
    environment:
      - url=https://blog.aaronlenoir.com
      - VIRTUAL_HOST=blog.aaronlenoir.com
      - LETSENCRYPT_HOST=blog.aaronlenoir.com
      - LETSENCRYPT_EMAIL=info@aaronlenoir.com
 ...
   ghost2:
    image: ghost:2-alpine
    restart: always
    depends_on:
      - "nginx-proxy"
    ports:
      - 127.0.0.1:8120:2368
    volumes:
      - ./blog2/data/ghost:/var/lib/ghost/content
    environment:
      - url=https://blog-test.aaronlenoir.com
      - VIRTUAL_HOST=blog-test.aaronlenoir.com
      - LETSENCRYPT_HOST=blog-test.aaronlenoir.com
      - LETSENCRYPT_EMAIL=info@aaronlenoir.com

For reference, I will keep the old blog around for a bit on the blog-test URL.

Here's the new configuration:

...
  ghost:
    image: ghost:1-alpine
    restart: always
    depends_on:
      - "nginx-proxy"
    ports:
      - 127.0.0.1:8080:2368
    volumes:
      - ./blog/data/ghost:/var/lib/ghost/content
    environment:
      - url=https://blog-test.aaronlenoir.com
      - VIRTUAL_HOST=blog-test.aaronlenoir.com
      - LETSENCRYPT_HOST=blog-test.aaronlenoir.com
      - LETSENCRYPT_EMAIL=info@aaronlenoir.com
 ...
   ghost2:
    image: ghost:2-alpine
    restart: always
    depends_on:
      - "nginx-proxy"
    ports:
      - 127.0.0.1:8120:2368
    volumes:
      - ./blog2/data/ghost:/var/lib/ghost/content
    environment:
      - url=https://blog.aaronlenoir.com
      - VIRTUAL_HOST=blog.aaronlenoir.com
      - LETSENCRYPT_HOST=blog.aaronlenoir.com
      - LETSENCRYPT_EMAIL=info@aaronlenoir.com

Conclusion

If you are reading this post, everything worked out! Phew!