From fd7a427f88a4eb30069c5caf4c9a0ebf1359d10b Mon Sep 17 00:00:00 2001 From: Fuwn Date: Mon, 6 May 2024 14:14:12 -0700 Subject: docs(readme): add undocumented docker information --- README.md | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 0749fbc..5b0a909 100644 --- a/README.md +++ b/README.md @@ -4,36 +4,33 @@ -## Installation +## Usage -### Self-hosting +### Local ```shell $ git clone https://github.com/Fuwn/counter.git $ cd counter -$ yarn install -$ yarn start +$ npm install # Or Bun, Yarn, pNPM, etc. +$ npm run start ``` -### Configuration +### Docker ```yaml -# config.yml +docker run --volume 'counter:/app/data' -p '80:3000' --rm fuwn/urushi-counter:latest +``` -app: - # site: https://counter.due.moe - port: 3000 +### Database -db: - type: sqlite # sqlite, mongodb -``` +`counter` will use SQLite by default, and will place the database file, `count.db`, within the `data/` directory of the root project folder. #### MongoDB -Expose a `DB_URL` environment variable +To use MongoDB instead of SQLite, expose a `DB_URL` environment variable. ```shell -export DB_URL=mongodb+srv://user:passwd@***.***.***.mongodb.net/db_count +export DB_URL=mongodb+srv://user:password@mongodb.example.com/counter ``` ### Resource Attributions -- cgit v1.2.3