From ed0c6b4f0a1f94eee4652ff7d6845ebd5138225b Mon Sep 17 00:00:00 2001 From: mtrx Date: Sat, 10 Aug 2024 09:08:43 +0200 Subject: [PATCH] updated readme --- README.md | 27 ++++++++++++++++----------- crablog.env | 9 --------- 2 files changed, 16 insertions(+), 20 deletions(-) delete mode 100644 crablog.env diff --git a/README.md b/README.md index fbddbc6..b486350 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ Pure rust. Built with actix, diesel, tera, serde and sqlite3. ## Run instructions using docker +**TODO REWRITE, OUTDATED** + 1. Clone the repository ```bash git clone https://github.com/mtrx1337/crablog @@ -23,20 +25,19 @@ docker-compose up -d ## Configuration environment file -All configuration options are defined in crablog.env, 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. +All configuration options are defined in .env which should be placed in the path where crablog is run. An example configuration is provided: -`crablog.env` +`.env` ``` 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 +EMAIL=me@mydomain.tld # optional +BIND_PORT=8000 # optional +SUBMIT_TOKEN=Submit!123 # required, token needed for submitting +GITHUB_ACCOUNT=yourusername # optional +TWITTER_ACCOUNT=yourusername # optional +MASTODON_ACCOUNT=yourusername@mastodon.social # optional +REDDIT_ACCOUNT=yourusername # optional +DISCORD_ACCOUNT=yourusername # optional # only needed when not using a docker container ROOT_PATH=/path/to/template/directory/and/sqliteDB @@ -58,3 +59,7 @@ ROOT_PATH=/path/to/template/directory/and/sqliteDB | Route | Description | | ---------------- | ------------------------- | | `api/blog/posts` | returns all posts as json | + +## Regenerate Migrations from Schema: + +`diesel migration generate --diff-schema=./src/db/schema.rs create_posts` diff --git a/crablog.env b/crablog.env deleted file mode 100644 index 0342b21..0000000 --- a/crablog.env +++ /dev/null @@ -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 \ No newline at end of file