Skip to content

Commit

Permalink
feat(docker): add run options to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
RobBrazier committed Dec 6, 2024
1 parent 9f67976 commit f1e2f76
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 3 deletions.
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,36 @@ As an example, the cron job I use is:
```

This runs every hour on the hour

## Running via Docker

```bash
docker pull ghcr.io/robbrazier/readflow
```

### Environment Variables

| Name | Default | Notes | <!-- markdownlint-disable-line MD013 -->
|---------------------|-------------------|---------------------------------------------------------------------------------------------------------------------| <!-- markdownlint-disable-line MD013 -->
| SOURCE | database | Leave as default - there are no other options currently | <!-- markdownlint-disable-line MD013 -->
| TARGETS | anilist,hardcover | Defaults to all targets | <!-- markdownlint-disable-line MD013 -->
| COLUMN_CHAPTER | false | Only used for Anilist - set if you want to count chapters | <!-- markdownlint-disable-line MD013 -->
| DATABASE_CALIBRE | /data/metadata.db | Mount your metadata.db here | <!-- markdownlint-disable-line MD013 -->
| DATABASE_CALIBREWEB | /data/app.db | Mount your app.db here | <!-- markdownlint-disable-line MD013 -->
| CRON_SCHEDULE | @hourly | See [crontab.guru](https://crontab.guru/#@hourly) for syntax | <!-- markdownlint-disable-line MD013 -->
| TOKEN_ANILIST | | Anilist token - Retrieve from [here](https://anilist.co/api/v2/oauth/authorize?client_id=21288&response_type=token) | <!-- markdownlint-disable-line MD013 -->
| TOKEN_HARDCOVER | | Hardcover token - Retrieve from [here](https://hardcover.app/account/api) | <!-- markdownlint-disable-line MD013 -->

### Run modes

#### Cron Job

```bash
docker run -e CRON_SCHEDULE="@daily" ghcr.io/robbrazier/readflow
```

#### One-off Sync

```bash
docker run ghcr.io/robbrazier/readflow sync
```
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ require (
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-localereader v0.0.1 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/mattn/go-sqlite3 v1.14.24 // indirect
github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
github.com/muesli/cancelreader v0.2.2 // indirect
Expand Down
3 changes: 1 addition & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,8 @@ github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2J
github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88=
github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc=
github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
github.com/mattn/go-sqlite3 v1.14.22 h1:2gZY6PC6kBnID23Tichd1K+Z0oS6nE/XwU+Vz/5o4kU=
github.com/mattn/go-sqlite3 v1.14.22/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
github.com/mattn/go-sqlite3 v1.14.24 h1:tpSp2G2KyMnnQu99ngJ47EIkWVmliIizyZBfPrBWDRM=
github.com/mattn/go-sqlite3 v1.14.24/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4=
github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE=
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI=
Expand Down

0 comments on commit f1e2f76

Please sign in to comment.