Skip to content

Commit

Permalink
Updated dependencies, missing configuration docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kugelschieber committed Dec 17, 2024
1 parent 1de7416 commit ce97015
Show file tree
Hide file tree
Showing 10 changed files with 92 additions and 32 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.10.1

* updated dependencies

## 0.10.0

* fixed concurrent data access
Expand Down
59 changes: 41 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,51 +52,74 @@ WantedBy=multi-user.target

## Configuration

Shifu is configured using a single `config.json` file inside the project directory.
Shifu is configured using a single `config.json` file inside the project directory. Keys starting with `_` are comments.

```json
{
"dev": false,
"log_level": "info", // debug, info, warn, error
"_log_level": "debug, info, warn, error",
"log_level": "info",
"server": {
"host": "localhost", // leave empty for production
"_host": "Leave empty for production",
"host": "localhost",
"port": 8080,
"shutdown_time": 30, // time before the server is forcefully shut down (optional)
"write_timeout": 5, // request write timeout
"read_timeout": 5, // request read timeout
"_shutdown_time": "Time before the server is forcefully shut down (optional)",
"shutdown_time": 30,
"_write_timeout": "Request write timeout",
"write_timeout": 5,
"_read_timeout": "Request read timeout",
"read_timeout": 5,
"tls_cert_file": "cert/file.pem",
"tls_key_file": "key/file.pem",
"hostname": "example.com",
"secure_cookies": true,
"cookie_domain_name": "example.com"
},
"content": {
"_provider": "git, fs",
"provider": "git",
"update_seconds": 600,
"repository": "https://..."
},
"cors": {
"origins": "*",
"loglevel": "info"
},
"sass": { // optional configuration to compile sass
"dir": "assets", // asset directory path
"entrypoint": "style.scss", // main sass file
"out": "static/style.css", // compiled output css file path
"out_source_map": "static/style.css.map", // css map file (optional)
"watch": true // re-compile files when changed
"_sass": "Optional configuration to compile Sass",
"sass": {
"_dir": "Asset directory path",
"dir": "assets",
"_entrypoint": "Main sass file",
"entrypoint": "style.scss",
"_out": "Compiled output CSS file path",
"out": "static/style.css",
"_out_source_map": "CSS map file (optional)",
"out_source_map": "static/style.css.map",
"_watch": "Re-compile files when changed",
"watch": true
},
"js": { // optional configuration to compile js/ts (see sass configuration for reference)
"_js": "Optional configuration to compile js/ts (see Sass configuration for reference)",
"js": {
"dir": "assets",
"entrypoint": "entrypoint.js",
"out": "static/bundle.js",
"out_source_map": "static/bundle.js.map",
"watch": true
},
"analytics": { // optional analytics configuration
"_analytics": "Optional analytics configuration",
"analytics": {
"provider": "pirsch",
"client_id": "...", // optional when using an access key (recommended) instead of oAuth
"client_secret": "...", // required
"subnets": [ // optional subnet configuration
"_client_id": "Optional when using an access key (recommended) instead of oAuth",
"client_id": "...",
"_client_secret": "Required",
"client_secret": "...",
"_subnets": "Optional subnet configuration",
"subnets": [
"10.1.0.0/16",
"10.2.0.0/8"
],
"header": [ // optional IP header configuration
"_header": "Optional IP header configuration",
"header": [
"X-Forwarded-For",
"Forwarded"
]
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/Masterminds/sprig/v3 v3.3.0
github.com/evanw/esbuild v0.24.0
github.com/fsnotify/fsnotify v1.8.0
github.com/go-chi/chi/v5 v5.1.0
github.com/go-chi/chi/v5 v5.2.0
github.com/go-chi/cors v1.2.1
github.com/gorilla/mux v1.8.1
github.com/klauspost/compress v1.17.11
Expand All @@ -29,7 +29,7 @@ require (
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/shopspring/decimal v1.4.0 // indirect
github.com/spf13/cast v1.7.0 // indirect
golang.org/x/crypto v0.30.0 // indirect
golang.org/x/crypto v0.31.0 // indirect
golang.org/x/sys v0.28.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ github.com/go-chi/chi/v5 v5.0.12 h1:9euLV5sTrTNTRUU9POmDUvfxyj6LAABLUcEWO+JJb4s=
github.com/go-chi/chi/v5 v5.0.12/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
github.com/go-chi/chi/v5 v5.1.0 h1:acVI1TYaD+hhedDJ3r54HyA6sExp3HfXq7QWEEY/xMw=
github.com/go-chi/chi/v5 v5.1.0/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
github.com/go-chi/chi/v5 v5.2.0 h1:Aj1EtB0qR2Rdo2dG4O94RIU35w2lvQSj6BRA4+qwFL0=
github.com/go-chi/chi/v5 v5.2.0/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
github.com/go-chi/cors v1.2.1 h1:xEC8UT3Rlp2QuWNEr4Fs/c2EAGVKBwy/1vHx3bppil4=
github.com/go-chi/cors v1.2.1/go.mod h1:sSbTewc+6wYHBBCW7ytsFSn836hqM7JxpglAy2Vzc58=
github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
Expand Down Expand Up @@ -110,6 +112,8 @@ golang.org/x/crypto v0.28.0 h1:GBDwsMXVQi34v5CCYUm2jkJvu4cbtru2U4TN2PSyQnw=
golang.org/x/crypto v0.28.0/go.mod h1:rmgy+3RHxRZMyY0jjAJShp2zgEdOqj2AO7U0pYmeQ7U=
golang.org/x/crypto v0.30.0 h1:RwoQn3GkWiMkzlX562cLB7OxWvjH1L8xutO2WoJcRoY=
golang.org/x/crypto v0.30.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U=
golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
Expand Down
2 changes: 1 addition & 1 deletion pkg/version.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package pkg

const (
version = "0.10.0"
version = "0.10.1"
)

// Version returns the Shifu version number.
Expand Down
5 changes: 3 additions & 2 deletions vendor/github.com/go-chi/chi/v5/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion vendor/github.com/go-chi/chi/v5/chi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion vendor/github.com/go-chi/chi/v5/context.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 26 additions & 5 deletions vendor/github.com/go-chi/chi/v5/mux.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ github.com/evanw/esbuild/pkg/api
## explicit; go 1.17
github.com/fsnotify/fsnotify
github.com/fsnotify/fsnotify/internal
# github.com/go-chi/chi/v5 v5.1.0
# github.com/go-chi/chi/v5 v5.2.0
## explicit; go 1.14
github.com/go-chi/chi/v5
# github.com/go-chi/cors v1.2.1
Expand Down Expand Up @@ -110,7 +110,7 @@ github.com/yuin/goldmark/renderer
github.com/yuin/goldmark/renderer/html
github.com/yuin/goldmark/text
github.com/yuin/goldmark/util
# golang.org/x/crypto v0.30.0
# golang.org/x/crypto v0.31.0
## explicit; go 1.20
golang.org/x/crypto/bcrypt
golang.org/x/crypto/blowfish
Expand Down

0 comments on commit ce97015

Please sign in to comment.