README: add table of contents, add Running with Docker section (#101)
* README: add table of contents, add Running with Docker section * Remove outdated REGISTRATION_PASSWORD details
This commit is contained in:
parent
f687152455
commit
4658d90c8c
1 changed files with 18 additions and 4 deletions
22
README.md
22
README.md
|
@ -4,7 +4,17 @@ Drift is a self-hostable Gist clone. It's also a major work-in-progress, but is
|
|||
|
||||
You can try a demo at https://drift.maxleiter.com. The demo is built on master but has no database, so files and accounts can be wiped at any time.
|
||||
|
||||
If you want to contribute, need support, or want to stay updated, you can join the IRC channel at #drift on irc.libera.chat or [reach me on twitter](https://twitter.com/Max_Leiter). If you don't have an IRC client yet, you can use a webclient [here](https://demo.thelounge.chat/#/connect?join=%23drift&nick=drift-user&realname=Drift%20User).
|
||||
If you want to contribute, need support, or want to stay updated, you can join the IRC channel at #drift on irc.libera.chat or [reach me on twitter](https://twitter.com/Max_Leiter). If you don't have an IRC client yet, you can use a webclient [here](https://demo.thelounge.chat/#/connect?join=%23drift&nick=drift-user&realname=Drift%20User).
|
||||
<hr />
|
||||
|
||||
**Contents:**
|
||||
- [Setup](#setup)
|
||||
- [Development](#development)
|
||||
- [Production](#production)
|
||||
- [Environment variables](#environment-variables)
|
||||
- [Running with pm2](#running-with-pm2)
|
||||
- [Running with Docker](#running-with-docker)
|
||||
- [Current status](#current-status)
|
||||
|
||||
## Setup
|
||||
|
||||
|
@ -17,7 +27,7 @@ To migrate the sqlite database in development, you can use `yarn migrate` to see
|
|||
|
||||
### Production
|
||||
|
||||
`yarn build` in both `client/` and `server/` will produce production code for the client and server respectively. The client and server each also have Dockerfiles which you can use with a docker-compose (an example compose will be provided in the near future).
|
||||
`yarn build` in both `client/` and `server/` will produce production code for the client and server respectively.
|
||||
|
||||
If you're deploying the front-end to something like Vercel, you'll need to set the root folder to `client/`.
|
||||
|
||||
|
@ -38,7 +48,7 @@ You can change these to your liking.
|
|||
- `NODE_ENV`: defaults to development, can be `production`
|
||||
- `JWT_SECRET`: a secure token for JWT tokens. You can generate one [here](https://www.grc.com/passwords.htm).
|
||||
- `MEMORY_DB`: if `true`, a sqlite database will not be created and changes will only exist in memory. Mainly for the demo.
|
||||
- `REGISTRATION_PASSWORD`: if MEMORY_DB is not `true`, the user will be required to provide this password to sign-up, in addition to their username and account password. If it's not set, no password will be required.
|
||||
- `REGISTRATION_PASSWORD`: if `true`, the user will be required to provide this password to sign-up, in addition to their username and account password. If it's not set, no additional password will be required.
|
||||
- `SECRET_KEY`: the same secret key as the client
|
||||
- `WELCOME_CONTENT`: a markdown string that's rendered on the home page
|
||||
- `WELCOME_TITLE`: the file title for the post on the homepage.
|
||||
|
@ -57,6 +67,10 @@ Then, use the following commands to start the client and server:
|
|||
|
||||
You now use `pm2 ls` to see their statuses. Refer to pm2's docs or `pm2 help` for more information.
|
||||
|
||||
## Running with Docker
|
||||
|
||||
The client and server each have Dockerfiles ([client](https://github.com/MaxLeiter/Drift/blob/main/client/Dockerfile), [server](https://github.com/MaxLeiter/Drift/blob/main/server/Dockerfile)) you can use with a docker-compose; an example compose [is provided in the repository](https://github.com/MaxLeiter/Drift/blob/main/docker-compose.yml). It's recommended you pair running them with nginx or another reverse proxy. Also review the environment variables above and configure them to your liking.
|
||||
|
||||
## Current status
|
||||
|
||||
Drift is a major work in progress. Below is a (rough) list of completed and envisioned features. If you want to help address any of them, please let me know regardless of your experience and I'll be happy to assist.
|
||||
|
@ -72,7 +86,7 @@ Drift is a major work in progress. Below is a (rough) list of completed and envi
|
|||
- [x] password protected posts
|
||||
- [x] sqlite database
|
||||
- [ ] administrator account / settings
|
||||
- [ ] docker-compose (PR: [#13](https://github.com/MaxLeiter/Drift/pull/13))
|
||||
- [x] docker-compose (PRs: [#13](https://github.com/MaxLeiter/Drift/pull/13), [#75](https://github.com/MaxLeiter/Drift/pull/75))
|
||||
- [ ] publish docker builds
|
||||
- [ ] user settings
|
||||
- [ ] works enough with JavaScript disabled
|
||||
|
|
Loading…
Reference in a new issue