-
Notifications
You must be signed in to change notification settings - Fork 24
install
xcsoft edited this page Oct 16, 2024
·
12 revisions
You can choose one of the following three ways to run it.
git clone https://github.com/soxft/busuanzi.git && cd busuanzi
go build -o busuanzi main.go
- Modify
config.yml
according to the prompts. - Edit
dist/busuanzi.js
or compiledist/busuanzi.ts
, replacing the link with your own deployment. - Start the program by running
./busuanzi
.
Create a file named docker-compose.yaml
in an empty folder. See docker-compose.yaml for the content.
Environment Variable | Description |
---|---|
API_SERVER | The API address for busuanzi.js, needs to be translated * |
WEB_LOG | Whether to enable logging, default is true |
REDIS_ADDRESS | Redis address, defaults to redis:6379 |
REDIS_PASSWORD | Redis password, defaults to empty |
BSZ_SECRET | Signature key, fill with a string of any length |
Run docker compose up -d
, the service will run on port 8080. You can also modify docker-compose.yml
to specify a different port.
You can also modify ~/data/bsz/config.yaml
for custom configurations, then restart the container.
TIPS: All settings in the config can be overridden using environment variables.
Ex. BSZ_SECRET = 123 will override Bsz.Secret in config.yaml.
For example, if your deployment URL is https://busuanzi.9420.ltd
, please fill in the env as https:\/\/busuanzi.9420.ltd
.
$ git clone https://github.com/soxft/busuanzi && cd busuanzi
# Choose the binary file suitable for your system version from Releases (from v2.8.0 onwards, all binaries are automatically built by GitHub Actions)
$ wget https://github.com/soxft/busuanzi/releases/download/v2.8.3/busuanzi-linux-amd64-v2.8.3 -O busuanzi
$ chmod +x busuanzi
# Run busuanzi
$ ./busuanzi