Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules
package-lock.json
/coverage
/docs
/.nyc_output


9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM node:10-alpine

WORKDIR /app
COPY . /app/
RUN yarn install --production

EXPOSE 8080

CMD ["npm", "start"]
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,22 @@ This project contains a [https://yarnpkg.com/](Yarn) lock file which is a faster
## Installation
Install as a normal Node.js application. Add the required [configuration](#configuration) values via environment variables or similar mechanism. Or deploy to Heroku:

[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/voxpelli/webpage-micropub-to-github)
[![Deploy heroku](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/voxpelli/webpage-micropub-to-github)

### Deploy to now

1. Install [now cli](https://zeit.co/download).
2. Edit `now.json` to have right values relevant for your project.
Especially make sure to change the `alias` to something unique.
3. Run `now secret add micropub-github-token <yourtoken>` to setup secret.
4. Run `now` to do deployment to now.
5. Run `now alias`

This will setup a url endpoint i.e. `https://mysite-micropub.now.sh/micropub/main`
you can then use in your site.

Note: this uses version1 of now that is based on full Docker. You'll
get warnings about this but it is okey - things still works.

## Endpoint discovery
Once deployed, your Micropub endpoint can be found at `/micropub/main` e.g. `https://example.com/micropub/main`.
Expand Down
15 changes: 15 additions & 0 deletions now.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "webpage-micropub-to-github",
"alias": "johndoe-micropub.now.sh",
"public": true,
"version": 1,
"type": "docker",
"env": {
"MICROPUB_TOKEN_ENDPOINT": "https://tokens.indieauth.com/token",
"MICROPUB_TOKEN_ME": "https://johndoe.example",
"MICROPUB_GITHUB_TOKEN": "@micropub-github-token",
"MICROPUB_GITHUB_USER": "johndoe",
"MICROPUB_SITE_GITHUB_REPO": "johndoe.github.io",
"MICROPUB_SITE_URL": "https://johndoe.example"
}
}