{"id":13550344,"url":"https://github.com/Stono/ghost-static","last_synced_at":"2025-04-03T00:33:41.417Z","repository":{"id":70092728,"uuid":"163889515","full_name":"Stono/ghost-static","owner":"Stono","description":"Ghost blog, in a container, with scripts to upload static content to gcs","archived":false,"fork":false,"pushed_at":"2023-01-30T08:39:25.000Z","size":20,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-06T19:57:18.745Z","etag":null,"topics":["blogging","docker","gcs","ghost"],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Stono.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-01-02T21:04:40.000Z","updated_at":"2022-04-06T14:33:40.000Z","dependencies_parsed_at":"2023-05-02T13:01:44.981Z","dependency_job_id":null,"html_url":"https://github.com/Stono/ghost-static","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stono%2Fghost-static","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stono%2Fghost-static/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stono%2Fghost-static/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stono%2Fghost-static/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Stono","download_url":"https://codeload.github.com/Stono/ghost-static/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246916733,"owners_count":20854511,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blogging","docker","gcs","ghost"],"created_at":"2024-08-01T12:01:31.973Z","updated_at":"2025-04-03T00:33:37.694Z","avatar_url":"https://github.com/Stono.png","language":"Dockerfile","funding_links":[],"categories":["Dockerfile","docker"],"sub_categories":[],"readme":"# Ghost static site in a Dockerfile\nThis is a dockerfile which allows you to build a site using the ghost blogging platform, and then generate it all as static content.  It also includes the utilities required to upload it to Google Cloud Storage.\n\nIt's pretty opinionated in that it:\n\n  - Has disqus comments enabled\n  - Uses date url slugs (eg https://karlstoney.com/2018/07/07/managing-your-costs-on-kubernetes), although you can change this by editing [routes.yaml](data/content/settings/routes.yaml).\n  - Expects your domain to be hosted on https://\n  - In order to use the gstuil upload to a gcs bucket, you have gcloud authenticated on your host machine \n  \nThat's because it's for my blog at https://karlstoney.com, however you're free to use it - you'll just need to:\n\n  - edit docker-compose.yml and replace the domain with your own\n  - edit patches/disqus.patch and update your disqus id\n\n## Starting ghost\nSimply do a `docker-compose up`.  Your data will be persisted to the `/data/content/` volume mounts so you can start and stop the container whenever you need.\n\n## Editing your content\nOnce ghost is running, go to `http://127.0.0.1` and use it just like you would anywhere else, modify your content and so on.\n\n## Generating your static content\nWhen you're happy with your content, you want to crawl the site and generate a static version so we can store it in a bucket.  I've added one helper script in [bin/generate_static_content.sh](bin/generate_static_content.sh) which will:\n\n  - Use [ghost-static-site-generator](https://github.com/Fried-Chicken/ghost-static-site-generator) to generate the static content\n  - Use gsutil to upload your content to a bucket (make sure the bucket exists for your domain)\n\nIn order to run it, make sure ghost is running with `docker-compose up` and then in another window do `docker-compose exec app /usr/local/bin/generate_static_content.sh`.\n\n## Hosting it\nAs I mentioned above, I have a Google Cloud Storage bucket which all the static content goes into.  That's configured as a \"website\" for \"karlstoney.com\", I then use Cloudflare free to front this as a CDN.  And voilla, blog hosting for pennies per month.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStono%2Fghost-static","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FStono%2Fghost-static","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStono%2Fghost-static/lists"}