diff --git a/README.md b/README.md index 7aca80c..7fafef6 100644 --- a/README.md +++ b/README.md @@ -20,18 +20,39 @@ Available: Waiting to be implemented: -- (Bulk) import/export (Markdown, PDF) -- Webhooks +- Import/export of notes ([#7](https://git.umbrella.haus/ae/qnote/issues/7)) + - Bulk import/export with Markdown + - Single note export with PDF +- Webhook compatibility ([#4](https://git.umbrella.haus/ae/qnote/issues/4)) ## Usage -The Dockerized app can be run in fullstack (`docker-compose-full.yml`) and backend (`docker-compose-back.yml`) modes. In backend mode only the Golang server (and the Postgres database) are containerized and the frontend can be run separately for quicker development (`npm run dev`). The default fullstack setup defaults to exposing port 3000. +The app can be run in two modes: -The `./scripts/run_dev.sh -h` output can be used as reference of running each of the available modes (or purging data from previous test runs with `-p` or `-q`): +- Combined/fullstack (`docker-compose-full.yml`) + - Frontend published to `0.0.0.0:3000` (`DOMAIN` must be set to the "server's" IP address when accessing e.g. from local network, otherwise the authentication cookies won't be sent correctly by client's browser) +- Dockerized backend & Vite dev server (`docker-compose-back.yml`) + - Frontend published to `localhost:5173` + - Golang server and Postgres database are containerized and the frontend can be run in development mode with `npm run dev` -``` +The `./scripts/run_dev.sh -h` output can be used as a reference of running each of the available modes (combined, separate frontend and backend, or purging data from previous test runs with `-p` or `-q`): + +```shell [?] usage: ./scripts/run_dev.sh [-h|-f|-p] -f run both frontend and backend (default: false) -p purge any existing database artifacts (default: false) -q only purge old data without building/spawning any new containers (default: false) ``` + +## Configuration + +| Variable | Description | Default | +| -------------------------- | ---------------------------------------------------------------------- | -------------------------- | +| `PG_*` | Postgres credentials | `qnote` (user and DB name) | +| `*_SECRET` | Backend secrets | - | +| `ADMIN_*` | Initial admin account credentials | - | +| `ACCOUNT_CREATION_ENABLED` | Boolean to toggle registration | `0` | +| `LOG_LEVEL` | Server log level | `info` | +| `APP_ENV` | Boolean to toggle production security features (HTTPS for CSRF & CORS) | `production` | +| `DOMAIN` | Domain of authentication cookies | `localhost` | +| `FRONTEND_URL` | CORS frontend URL | `http://localhost:3000` | diff --git a/docs/media/app.png b/docs/media/app.png index fe804de..63e423e 100644 Binary files a/docs/media/app.png and b/docs/media/app.png differ