Skip to content

Commit 8f0e42c

Browse files
committed
easy setup
1 parent ee877ec commit 8f0e42c

File tree

1 file changed

+12
-39
lines changed

1 file changed

+12
-39
lines changed

README.md

Lines changed: 12 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -21,63 +21,34 @@ The dofusdude server is always running with the latest Dofus version and it is h
2121
- [Python](https://github.com/dofusdude/dofusdude-py) `pip install dofusdude`
2222
- [Java](https://github.com/dofusdude/dofusdude-java) Maven with GitHub packages setup
2323

24-
## Quickstart
24+
## Self-Hosting
2525

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.
2927

3028
```shell
31-
export MEILI_MASTER_KEY=$(echo $RANDOM | md5sum | head -c 20; echo;)
29+
# Prepare search engine environment
30+
export MEILI_MASTER_KEY=supersecretandhighlysecurekey
3231
echo "MEILI_MASTER_KEY=$MEILI_MASTER_KEY" > .env
3332

33+
# Install and run search engine
3434
curl -L https://install.meilisearch.com | sh
3535
./meilisearch --master-key $MEILI_MASTER_KEY &
3636

37-
curl -s https://api.github.com/repos/dofusdude/doduapi/releases/latest \
38-
| grep "browser_download_url.*Linux_x86_64*" \
39-
| cut -d : -f 2,3 \
40-
| tr -d \" \
41-
| head -n 1 \
42-
| xargs -n 1 curl -LO
43-
tar xfz doduapi_*
44-
./doduapi migrate up
45-
./doduapi
37+
# Install and run doduapi
38+
curl -s https://get.dofusdu.de/doduapi | sh
39+
doduapi migrate up
40+
doduapi
4641
```
4742
You can get the search engine process back with `fg` later.
4843

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-
7344
## Configuration
7445

7546
Open the `.env` with your favorite editor. Add more parameters if you want. Here is a full list.
7647

7748
```shell
7849
MEILI_MASTER_KEY=<already set> # a random string that must be the same in the meilisearch.service file or parameter
7950
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
8152
API_SCHEME=http # http or https. Just used for building links
8253
API_HOSTNAME=localhost # the hostname of the api. Just used for building links
8354
API_PORT=3000 # the port where to listen on
@@ -86,6 +57,8 @@ MEILI_PROTOCOL=http # http or https
8657
MEILI_HOST=127.0.0.1 # the hostname of meilisearch
8758
PROMETHEUS=false # enable prometheus metrics export running on one apiport + 1
8859
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
8962
IS_BETA=false # main (false) vs beta (true)
9063
UPDATE_HOOK_TOKEN=secret # /update/<token> will trigger an update with a POST request {"version": "<dofusversion>"}
9164
```

0 commit comments

Comments
 (0)