Skip to content

Commit 9af5571

Browse files
authored
Update build from source to use specific tag. (#123)
the-draupnir-project/Draupnir#1046
1 parent 68a911c commit 9af5571

File tree

2 files changed

+26
-18
lines changed

2 files changed

+26
-18
lines changed

docs/bot/setup_debian.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ install git curl and sudo
2222
apt update && apt install -y git curl sudo
2323
```
2424

25-
install node 20 from the node source repo, the full instructions can be found at https://nodesource.com/products/distributions
25+
install node 20 from the node source repo, the full instructions can be found at
26+
https://nodesource.com/products/distributions
2627

2728
```shell
2829
curl -fsSL https://deb.nodesource.com/setup_20.x -o nodesource_setup.sh
@@ -45,7 +46,7 @@ mkdir /opt/mod-bot
4546
clone the repo and fetch the tags
4647

4748
```shell
48-
git clone https://github.com/the-draupnir-project/Draupnir.git /opt/mod-bot/Draupnir
49+
git clone --branch v2.9.0 --depth 1 https://github.com/the-draupnir-project/Draupnir.git /opt/mod-bot/Draupnir
4950
```
5051

5152
```shell
@@ -64,8 +65,8 @@ add corepack
6465
yarn global add corepack
6566
```
6667

67-
add a user to run the bot
68-
this user will be used by systemd to run the bot since there is no need to run it with root permissions
68+
add a user to run the bot this user will be used by systemd to run the bot since
69+
there is no need to run it with root permissions
6970

7071
```shell
7172
useradd -m draupnir
@@ -92,26 +93,31 @@ copy the default config to production.yaml
9293
cp /opt/mod-bot/Draupnir/config/default.yaml /opt/mod-bot/Draupnir/config/production.yaml
9394
```
9495

95-
change the path of the datadirectory from the default to the directory we created earlier since the default dir is for the docker setup
96+
change the path of the datadirectory from the default to the directory we
97+
created earlier since the default dir is for the docker setup
9698

9799
```shell
98100
sed -i 's|dataPath: "/data/storage"|dataPath: "/opt/mod-bot/Draupnir/datastorage"|' /opt/mod-bot/Draupnir/config/production.yaml
99101
```
100102

101-
edit the production config:
102-
the most important things to configure are the `homeserverUrl:`, the `rawHomeserverUrl:`, the `accessToken:` and the `managementRoom:`
103+
edit the production config: the most important things to configure are the
104+
`homeserverUrl:`, the `rawHomeserverUrl:`, the `accessToken:` and the
105+
`managementRoom:`
103106

104107
```shell
105108
nano /opt/mod-bot/Draupnir/config/production.yaml
106109
```
107110

108111
## Example systemd service
109112

110-
copy this to `/etc/systemd/system/draupnir.service` and enable with `systemctl enable draupnir`, then simply start with `systemctl start draupnir`
113+
copy this to `/etc/systemd/system/draupnir.service` and enable with
114+
`systemctl enable draupnir`, then simply start with `systemctl start draupnir`
111115

112116
:::tip
113117

114-
before you attempt to start the service, make sure that the management room for draupnir exists on your homeserver and is joinable by draupnir (either public room or invite the bot account in advance)
118+
before you attempt to start the service, make sure that the management room for
119+
draupnir exists on your homeserver and is joinable by draupnir (either public
120+
room or invite the bot account in advance)
115121

116122
:::
117123

@@ -157,7 +163,8 @@ WantedBy=multi-user.target
157163

158164
## Updating the bot
159165

160-
if you want to update && upgrade everything, use the draupnir useraccount in order to not create conflicts with filepermissions/ownerships
166+
if you want to update && upgrade everything, use the draupnir useraccount in
167+
order to not create conflicts with filepermissions/ownerships
161168

162169
stop the bot
163170

@@ -168,7 +175,7 @@ systemctl stop draupnir
168175
pull updates from github with
169176

170177
```shell
171-
sudo -u draupnir bash -c "cd /opt/mod-bot/Draupnir && git pull && git fetch --tags"
178+
sudo -u draupnir bash -c "cd /opt/mod-bot/Draupnir && git fetch --tags && git checkout v2.9.0"
172179
```
173180

174181
install/update yarn

docs/bot/setup_selfbuild.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,24 @@ sidebar_label: Advanced setup from source
77

88
:::tip
99

10-
This guide is for experienced system administrators.
11-
The recommended installation method is [using Docker with systemd](./systemd).
10+
This guide is for experienced system administrators. The recommended
11+
installation method is [using Docker with systemd](./systemd).
1212

1313
:::
1414

1515
:::info
1616

17-
This guide is meant to be read in conjunction with [Draupnir parameters and options](./starting_draupnir).
17+
This guide is meant to be read in conjunction with
18+
[Draupnir parameters and options](./starting_draupnir).
1819

1920
:::
2021

21-
These instructions are to build and run draupnir without using [Docker](./setup_docker.md).
22-
You need to have installed `yarn` 1.x and Node 20.
22+
These instructions are to build and run draupnir without using
23+
[Docker](./setup_docker.md). You need to have installed `yarn` 1.x and Node 20.
2324

2425
```bash
25-
git clone https://github.com/the-draupnir-project/Draupnir.git
26-
cd draupnir
26+
git clone --branch v2.9.0 --depth 1 https://github.com/the-draupnir-project/Draupnir.git
27+
cd Draupnir
2728
git fetch --tags
2829

2930
yarn install

0 commit comments

Comments
 (0)