Calibre web frontend, Go (golang) https://bouquins.meutel.net
Go to file
Meutel e2f90ffb80
All checks were successful
continuous-integration/drone/push Build is passing
Version
* log on startup
* display on about page
* use compile flag
* set with git tag value
2019-09-28 17:44:55 +02:00
.ansible Version 2019-09-28 17:44:55 +02:00
assets MAJ vue.js 2019-09-28 11:54:14 +02:00
bouquins Version 2019-09-28 17:44:55 +02:00
templates Version 2019-09-28 17:44:55 +02:00
.drone.yml Version 2019-09-28 17:44:55 +02:00
.gitignore Config yaml 2019-09-12 14:34:26 +02:00
Dockerfile Version 2019-09-28 17:44:55 +02:00
go.mod Config yaml 2019-09-12 14:34:26 +02:00
go.sum Config yaml 2019-09-12 14:34:26 +02:00
LICENSE Initial commit 2017-07-30 20:15:54 +02:00
main.go Version 2019-09-28 17:44:55 +02:00
README.md Version 2019-09-28 17:44:55 +02:00

go-bouquins

Bouquins in Go

TODO

  • translations
  • tests
  • csrf
  • userdb commands (init, migrate, add/remove user/email)
  • error pages

Minify

Versionning

Build with flag to define main.version

go build -ldflags "-X main.version=myVersion"

Deployment archive

tar czf ~/tmp/go-bouquins.tar.gz go-bouquins assets/ templates/

Configuration

JSON config file: default ./bouquins.json, or binary argument

Example:

{
  "calibre-path": "/usr/home/meutel/data/calibre",
  "bind-address": ":8080",
  "prod": true,
  "cookie-secret": "random",
  "external-url":"https://bouquins.meutel.net",
  "providers": [
    {
      "name": "github",
      "client-id": "ID client",
      "client-secret": "SECRET"
    },
    {
      "name": "google",
      "client-id":"ID client",
      "client-secret":"SECRET"
    }
  ]
}

Options:

  • calibre-path path to calibre data
  • db-path path to calibre SQLite database (default /metadata.db)
  • user-db-path path to users SQLite database (default ./users.db)
  • bind-address HTTP socket bind address
  • prod (boolean) use minified javascript/CSS
  • cookie-secret random string for cookie encryption
  • external-url URL used by client browsers
  • providers configuration for OAuth 2 providers
    • name provider name
    • client-id OAuth client ID
    • client-secret OAuth secret

Users SQL

CREATE TABLE accounts (id varchar(36) PRIMARY KEY NOT NULL, name varchar(255) NOT NULL); CREATE TABLE authentifiers (id varchar(36) NOT NULL, authentifier varchar(320) PRIMARY KEY NOT NULL, FOREIGN KEY(id) REFERENCES account(id));