1amends "../../config/Service.pkl"
2
3import "../../config/site.pkl" as site
4
5local host = module.container.http.hostname
6
7name = "Snowcord"
8tagline = "Plugin record sync for the Articuno Discord mod"
9launcher = false
10healthyDeadline = "5m"
11
12requiredSecrets { "discord_client_secret"; "session_encryption_key" }
13
14container {
15 build = "build"
16 cpu = 500
17 memory = 768
18
19 http {
20 containerPort = 8787
21 subdomain = "snowcord"
22 }
23
24 volumes {
25 ["/data"] {}
26 ["/work"] {}
27 // Articuno's Shale repository, which keeps it under its UUID through renames.
28 ["/source.git"] { src = "\(site.root)/prod/shale/repositories_owned/006ABG3FTYNV0FMR55QPHGY9G1"; readOnly = true }
29 }
30
31 env {
32 ["BRANCH"] = "clover/sync-api"
33 ["HOME"] = "/work"
34 ["NODE_ENV"] = "production"
35 ["DISCORD_CLIENT_ID"] = "1573069861699981404"
36 ["DISCORD_CLIENT_SECRET"] = "${secret.own.discord_client_secret}"
37 ["DISCORD_REDIRECT_URI"] = "https://\(host)/oauth/discord"
38 ["SESSION_ENCRYPTION_KEY"] = "${secret.own.session_encryption_key}"
39 ["DB_PATH"] = "/data/snowcord.sqlite"
40 ["HOST"] = "0.0.0.0"
41 ["PORT"] = "8787"
42 // Caddy as seen across the Podman bridge.
43 ["TRUST_PROXY_IP"] = "10.88.0.1"
44 ["CORS_ORIGINS"] = "https://discord.com,https://canary.discord.com,https://ptb.discord.com"
45 }
46}