updated readme
This commit is contained in:
parent
1e3e1eddc9
commit
ed0c6b4f0a
2 changed files with 16 additions and 20 deletions
27
README.md
27
README.md
|
@ -4,6 +4,8 @@ Pure rust. Built with actix, diesel, tera, serde and sqlite3.
|
||||||
|
|
||||||
## Run instructions using docker
|
## Run instructions using docker
|
||||||
|
|
||||||
|
**TODO REWRITE, OUTDATED**
|
||||||
|
|
||||||
1. Clone the repository
|
1. Clone the repository
|
||||||
```bash
|
```bash
|
||||||
git clone https://github.com/mtrx1337/crablog
|
git clone https://github.com/mtrx1337/crablog
|
||||||
|
@ -23,20 +25,19 @@ docker-compose up -d
|
||||||
|
|
||||||
## Configuration environment file
|
## Configuration environment file
|
||||||
|
|
||||||
All configuration options are defined in crablog.env, an example configuration is provided.
|
All configuration options are defined in .env which should be placed in the path where crablog is run. An example configuration is provided:
|
||||||
When not using Docker you may have to add crablog.env to your startup script or define the variables there.
|
|
||||||
|
|
||||||
`crablog.env`
|
`.env`
|
||||||
```
|
```
|
||||||
USERNAME=yourusername
|
USERNAME=yourusername
|
||||||
EMAIL=me@mydomain.tld
|
EMAIL=me@mydomain.tld # optional
|
||||||
BIND_PORT=8000
|
BIND_PORT=8000 # optional
|
||||||
SUBMIT_TOKEN=Submit!123 # token needed for submitting
|
SUBMIT_TOKEN=Submit!123 # required, token needed for submitting
|
||||||
GITHUB_ACCOUNT=usernam3
|
GITHUB_ACCOUNT=yourusername # optional
|
||||||
TWITTER_ACCOUNT=usernam3
|
TWITTER_ACCOUNT=yourusername # optional
|
||||||
MASTODON_ACCOUNT=usernam3@mastodon.social
|
MASTODON_ACCOUNT=yourusername@mastodon.social # optional
|
||||||
REDDIT_ACCOUNT=usernam3
|
REDDIT_ACCOUNT=yourusername # optional
|
||||||
DISCORD_ACCOUNT=usernam3
|
DISCORD_ACCOUNT=yourusername # optional
|
||||||
|
|
||||||
# only needed when not using a docker container
|
# only needed when not using a docker container
|
||||||
ROOT_PATH=/path/to/template/directory/and/sqliteDB
|
ROOT_PATH=/path/to/template/directory/and/sqliteDB
|
||||||
|
@ -58,3 +59,7 @@ ROOT_PATH=/path/to/template/directory/and/sqliteDB
|
||||||
| Route | Description |
|
| Route | Description |
|
||||||
| ---------------- | ------------------------- |
|
| ---------------- | ------------------------- |
|
||||||
| `api/blog/posts` | returns all posts as json |
|
| `api/blog/posts` | returns all posts as json |
|
||||||
|
|
||||||
|
## Regenerate Migrations from Schema:
|
||||||
|
|
||||||
|
`diesel migration generate --diff-schema=./src/db/schema.rs create_posts`
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
USERNAME=yourusername
|
|
||||||
EMAIL=me@mydomain.tld
|
|
||||||
BIND_PORT=8000
|
|
||||||
SUBMIT_TOKEN=Submit!123 # token needed for submitting
|
|
||||||
GITHUB_ACCOUNT=usernam3
|
|
||||||
TWITTER_ACCOUNT=usernam3
|
|
||||||
MASTODON_ACCOUNT=usernam3@mastodon.social
|
|
||||||
REDDIT_ACCOUNT=usernam3
|
|
||||||
DISCORD_ACCOUNT=usernam3
|
|
Loading…
Reference in a new issue