Skip to content

Commit

Permalink
Add more details to deployment instructions
Browse files Browse the repository at this point in the history
This should reduce confusion for users less familiar with such a
stack, as was encountered in LostLuma#1.
  • Loading branch information
LostLuma committed Jul 13, 2022
1 parent a21b8fd commit 08d758a
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
# Starbin

A hastebin-compatible paste site running on Cloudflare Workers.
A hastebin-compatible paste site running on Cloudflare Workers / Pages.

# Deployment

To deploy as a pages project you will need to set up the following:

KV namespace bindings:

- ``STORAGE``: A KV namespace to store pastes in

Environment variables:

- ``DOCUMENT_KEY_SIZE``: Number of digits to use for document URLs
- ``MAX_DOCUMENT_SIZE``: Maximum number of characters allowed per paste
- ``DOCUMENT_EXPIRE_TTL``: Number of seconds until documents expire
To deploy as a Pages project you will need to follow these steps:

- Fork this repo to an account where you can install GitHub Apps
- Create an empty KV namespace to store pastes in on the Workers dashboard
- Create a new Pages project using the Git integration and your forked repo
- Set an empty ``echo`` command as the build command - no actual build is performed
- Set the build output directory to ``/static/`` to allow Pages to find the website
- Under the project's settings in the Functions tab set up a new KV namespace binding
- Set the variable name to ``STORAGE``, the namespace to the namespace from earlier
- Under the project's Environment Variables settings set up the following variables:
- ``DOCUMENT_KEY_SIZE``: Number of digits to use for document URLs
- ``MAX_DOCUMENT_SIZE``: Maximum number of characters allowed per paste
- ``DOCUMENT_EXPIRE_TTL``: Number of seconds until documents expire

And that's it! You may now set a custom domain if you'd like the site to be available outside of workers.dev

# TODO

Expand Down

0 comments on commit 08d758a

Please sign in to comment.