{"id":17495638,"url":"https://github.com/brint/alpine-ghost-s3","last_synced_at":"2025-04-02T14:13:28.406Z","repository":{"id":145583014,"uuid":"58270157","full_name":"brint/alpine-ghost-s3","owner":"brint","description":"POC: Alpine Linux + Ghost + S3","archived":false,"fork":false,"pushed_at":"2016-12-24T02:28:02.000Z","size":4,"stargazers_count":1,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-19T17:45:05.869Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/brint.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-05-07T14:43:53.000Z","updated_at":"2017-01-03T22:09:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"9ceaf3b7-6287-4c97-9d2c-0b50ed7a9f87","html_url":"https://github.com/brint/alpine-ghost-s3","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"df619ddfcf57f678a768661aa366920a084f68bd"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brint%2Falpine-ghost-s3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brint%2Falpine-ghost-s3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brint%2Falpine-ghost-s3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brint%2Falpine-ghost-s3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brint","download_url":"https://codeload.github.com/brint/alpine-ghost-s3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246828505,"owners_count":20840474,"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":[],"created_at":"2024-10-19T14:16:14.398Z","updated_at":"2025-04-02T14:13:28.385Z","avatar_url":"https://github.com/brint.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# alpine-ghost-s3\n\n**USE AT YOUR OWN RISK!** This is just a proof of concept.\n\nThis container is a simple example of how to deploy ghost using S3 as the storage backend and PostgreSQL as the database. Benefits:\n\n1. S3 for file storage, no need to worry about having images stored in a container.\n2. Database is an outside service configured by environment variables, making this more portable.\n3. Built with Alpine Linux making this image about half the size of the community ghost image.\n\n### Building\nClone the repo and build it using Docker:\n\n```\ngit clone git@github.com:brint/alpine-ghost-s3.git\ncd alpine-ghost-s3\ndocker build -t alpine-ghost-s3 .\n```\n\n### Running\nCopy `docker.env.example` to `docker.env` and put in your values. Look at `config.js` to see what you can set via environment variable:\n\n```\ndocker run --name ghost --env-file ./docker.env  -p 8080:2368 -it alpine-ghost-s3\n```\n\nAssuming all of your resources such as PostgreSQL and S3 are setup properly with the proper permissions, the output may look something like this:\n\n```\n$ docker run --name ghost --env-file ./docker.env  -p 8080:2368 -it alpine-ghost-s3\n\n\u003e ghost@0.8.0 start /\n\u003e node index\n\nMigrations: Database initialisation required for version 004\nMigrations: Creating tables...\nMigrations: Creating table: posts\nMigrations: Creating table: users\nMigrations: Creating table: roles\nMigrations: Creating table: roles_users\nMigrations: Creating table: permissions\nMigrations: Creating table: permissions_users\nMigrations: Creating table: permissions_roles\nMigrations: Creating table: permissions_apps\nMigrations: Creating table: settings\nMigrations: Creating table: tags\nMigrations: Creating table: posts_tags\nMigrations: Creating table: apps\nMigrations: Creating table: app_settings\nMigrations: Creating table: app_fields\nMigrations: Creating table: clients\nMigrations: Creating table: client_trusted_domains\nMigrations: Creating table: accesstokens\nMigrations: Creating table: refreshtokens\nMigrations: Running fixture populations\nMigrations: Creating owner\nMigrations: Ensuring default settings\nGhost is running in production...\nYour blog is now available on http://myblog.org\nCtrl+C to shut down\n```\n\nNow that the blog is up, you can access it at http://localhost:8080.\n\n### Troubleshooting\nUse the `-it` flags when launching the container to see the errors.\n\n#### Database\nIf the database isn't properly configured (firewall rules, etc), the container will not start. Here's an example error:\n\n```\n$ docker run --name some-ghost --env-file ./docker.env  -p 8080:2368 -it alpine-ghost-s3\n\n\u003e ghost@0.8.0 start /\n\u003e node index\n\nKnex:warning - Pool2 - Error: Pool was destroyed\nKnex:Error Pool2 - Error: connect ECONNREFUSED 127.0.0.1:5432\nKnex:Error Pool2 - Error: connect ECONNREFUSED 127.0.0.1:5432\n\nERROR: There is a problem with the database\n Pool was destroyed\n```\n\n#### S3\nIf you don't have the credentials, roles, or policies setup properly with S3, your error may look something like this:\n\n```\n172.17.0.1 - - [07/May/2016:14:21:15 +0000] \"GET /ghost/api/v0.1/settings/?type=blog%2Ctheme%2Cprivate HTTP/1.1\" 200 - \"http://localhost:8080/ghost/settings/navigation/\" \"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.94 Safari/537.36\"\nerror in ghost-s3 { [AccessDenied: Access Denied]\n  message: 'Access Denied',\n  code: 'AccessDenied',\n  region: null,\n  time: Sat May 07 2016 14:21:27 GMT+0000 (UTC),\n  requestId: 'BC3426EEF0DFA30E',\n  extendedRequestId: '1esG8QbYKlm7xKXDx89XtwwFwCZf2Ol2srh5oDVOiR38JfHkw2O7J/5KAx7mPJ+ssmVI9GztzA4=',\n  cfId: undefined,\n  statusCode: 403,\n  retryable: false,\n  retryDelay: 26.93648540880531 }\n```\n\n#### Mail\nIf you're using SES, and you haven't properly setup your from email address, it will be rejected with an error message like the following:\n```\nERROR: DeliveryError: Message delivery failed: 554 Message rejected: Email address is not verified.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrint%2Falpine-ghost-s3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrint%2Falpine-ghost-s3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrint%2Falpine-ghost-s3/lists"}