You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Java](https://github.com/dofusdude/dofusdude-java) Maven with GitHub packages setup
23
23
24
-
## Quickstart
24
+
## Self-Hosting
25
25
26
-
If you want to run `doduapi` for yourself, just follow the following commands. They assume Linux (x86_64). For MacOS, you need to `brew install md5sha1sum`. Or just make up your own keys. It's just to make the setup easy.
27
-
28
-
I can't help you for Windows since I don't have it. But there are prebuilt binaries in the [Releases](https://github.com/dofusdude/doduapi/releases) for it. Change the `Linux_x86_64` string accordingly in the curl command below.
26
+
If you want to host `doduapi` yourself, just follow these commands.
29
27
30
28
```shell
31
-
export MEILI_MASTER_KEY=$(echo $RANDOM| md5sum | head -c 20;echo;)
You can get the search engine process back with `fg` later.
48
43
49
-
## Development Setup
50
-
51
-
Follow the Quickstart for Meilisearch.
52
-
53
-
Now get the `doduapi` source code.
54
-
```shell
55
-
git clone https://github.com/dofusdude/doduapi
56
-
cd doduapi
57
-
```
58
-
59
-
You need to have [Go](https://go.dev/doc/install) >= 1.18 installed to run it.
60
-
61
-
The Almanax data is saved within a file database. `doduapi` can initialize the database structure itself with the following command.
62
-
```shell
63
-
go run . migrate up
64
-
```
65
-
66
-
You can specify the persistent directory with `--persistent-dir <dir>`. It uses the current working directory per default.
67
-
68
-
Now we can run doduapi from source. If you want more info about the specific tasks, you can set the `LOG_LEVEL` env to one of `debug`, `info`, `warn` (default), `error` or `fatal`. The more left you go in that list, the more info you get. I will also add `--headless` so I don't miss anything.
69
-
```shell
70
-
LOG_LEVEL=debug go run . --headless
71
-
```
72
-
73
44
## Configuration
74
45
75
46
Open the `.env` with your favorite editor. Add more parameters if you want. Here is a full list.
76
47
77
48
```shell
78
49
MEILI_MASTER_KEY=<already set># a random string that must be the same in the meilisearch.service file or parameter
79
50
DIR=<working directory># directory where the ./data dir can be found
80
-
DOFUS_VERSION=2.68.5.6# must match a name from https://github.com/dofusdude/dofus2-main/releases
51
+
DOFUS_VERSION=3.0.40.28# must match a name from https://github.com/dofusdude/dofus3-main/releases
81
52
API_SCHEME=http # http or https. Just used for building links
82
53
API_HOSTNAME=localhost # the hostname of the api. Just used for building links
83
54
API_PORT=3000 # the port where to listen on
@@ -86,6 +57,8 @@ MEILI_PROTOCOL=http # http or https
86
57
MEILI_HOST=127.0.0.1 # the hostname of meilisearch
87
58
PROMETHEUS=false # enable prometheus metrics export running on one apiport + 1
88
59
FILESERVER=true # will tell doduapi to serve the image files itself
60
+
ALMANAX_MAX_LOOKAHEAD_DAYS=365 # maximum date range size
61
+
ALMANAX_DEFAULT_LOOKAHEAD_DAYS=6 # default date range size
89
62
IS_BETA=false # main (false) vs beta (true)
90
63
UPDATE_HOOK_TOKEN=secret # /update/<token> will trigger an update with a POST request {"version": "<dofusversion>"}
0 commit comments