blob: 20912fbfb10571bf50f6850ca728e7b028282de7 [file] [log] [blame]
Serge Bazanski1572e522020-12-03 23:19:28 +01001local wow = import "lib.libsonnet";
2local mysql = import "../../../kube/mysql.libsonnet";
3
4{
5 q3k: wow {
6 local sqlPassword = (std.split(importstr "secrets/plain/mysql-root-password", "\n"))[0],
7 local soapPassword = (std.split(importstr "secrets/plain/soap-password", "\n"))[0],
8 local panelSecret = (std.split(importstr "secrets/plain/panel-secret", "\n"))[0],
9 local oauthSecret = (std.split(importstr "secrets/plain/oauth-secret", "\n"))[0],
10 local motd = importstr "secrets/plain/motd.txt",
11
12 local wow = self,
13 local cfg = self.cfg,
14 cfg+:: {
15 namespace: "personal-q3k",
16 prefix: "wow-",
17 address: "185.236.240.62",
18 db+: {
19 // Run everything as mysql root, #yolo.
20 local mkConfig = function(name) {
21 host: wow.mysql.svc.host,
22 port: wow.mysql.svc.port,
23 user: "root",
24 password: sqlPassword,
25 database: "acore_%s" % [name],
26 },
27 auth+: mkConfig("auth"),
28 world+: mkConfig("world"),
29 characters+: mkConfig("characters"),
30 },
31 panel+: {
32 domain: "wow.q3k.org",
33 soap+: {
34 username: "test1",
35 password: soapPassword,
36 },
37 secret: panelSecret,
38 oauth+: {
39 clientID: "56403ef3-df6f-4893-b475-d6c18284ed42",
40 clientSecret: oauthSecret,
41 },
42 motd: motd,
43 },
44 overrides+: {
45 worldserver: {
46 RealmZone: 8,
47 Motd: "Welcome to Pabianice. Enjoy your grind.",
48
49 "Rate.Drop.Item.Poor": 2,
50 "Rate.Drop.Item.Normal": 2,
51 "Rate.Drop.Item.Uncommon": 10,
52 "Rate.Drop.Item.Rare": 10,
53 "Rate.Drop.Item.Epic": 10,
54 "Rate.Drop.Item.Legendary": 10,
55 "Rate.Drop.Item.Artifact": 10,
56 "Rate.Drop.Item.Referenced": 10,
57 "Rate.Drop.Money": 10,
58 "Rate.XP.Kill": 5,
59 "Rate.XP.Explore": 5,
60 "Rate.XP.BattlegroundKill": 10,
61 "Rate.MoveSpeed": 2,
62 "SkillGain.Crafting": 5,
63 "SkillGain.Defense": 5,
64 "SkillGain.Gathering": 5,
65 "SkillGain.Weapon": 5,
66
67 "MinPetitionSigns": 5,
68 "GM.AllowFriend": 1,
69 },
70 ahbot: {
71 "AuctionHouseBot.EnableSeller": 1,
72 "AuctionHouseBot.EnableBuyer": 1,
73 "AuctionHouseBot.Account": 21,
74 "AuctionHouseBot.GUID": 12,
75 },
76 },
77 },
78
79 // Run a single shitty database.
80 mysql: mysql {
81 cfg+:: {
82 namespace: cfg.namespace,
83 appName: "wow",
84 prefix: cfg.prefix,
85 password: sqlPassword,
86 user: "acore",
87 },
88 },
89 },
90}