DEV Community

Cover image for Migrating from Medium to my own blog
Mike
Mike

Posted on • Originally published at mikenikles.com

5 1

Migrating from Medium to my own blog

How I moved to a self-hosted instance of Ghost on Google Cloud Platform with a static frontend developed with Sapper, Svelte & Tailwind CSS deployed to Firebase.

The previous blog

I previously published my blog posts on Medium. A lot has already been said about why people migrate away from Medium (search results). With the changes rolled out in 2019, my visitor numbers dropped significantly and I started to look for an alternative where I can share my thoughts and experience to anyone who's interested.

Where is my blog hosted?

tl;dr: www.mikenikles.com is a self-hosted instance of Ghost on Google Cloud Platform with a static frontend developed with Sapper, Svelte & Tailwind CSS deployed to Firebase.

All source code is available on Github.

www.mikenikles.com - Architecture

As part of my research, I looked at static site generators, SaaS solutions and - for a brief moment - considered spinning up my own very basic blogging platform. Luckily, I noticed how valuable time is and abandoned the self-developed blogging platform idea.

Ghost

Long story short, I found www.ghost.org. Their philosophy really closely aligns with my personal views and when I saw they offer an open source version, I was convinced.

The Ghost instance itself is deployed to Cloud Run (1), which spins up a Ghost container when I access the admin URL.
Upon publishing a new blog post, its content is persisted in Cloud SQL (2a) and any assets stored in Cloud Storage (2b). I open-sourced the storage adapter.

Static Website

Once a blog post is published, I kick off a process (3) to fetch the blog content (4) with Ghost's Content API, generate a static website and deploy it to Firebase Hosting (5).

The website is based on Sapper & Svelte and styled with Tailwind CSS.

Nice side effect - I don't need the database at runtime

That's true, since assets are stored on Cloud Storage and HTML, CSS and Javascript lives on Firebase Hosting, Ghost and its database are not accessed at runtime.

Do your career a big favor. Join DEV. (The website you're on right now)

It takes one minute, it's free, and is worth it for your career.

Get started

Community matters

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs