· 6 years ago · Jan 02, 2020, 08:08 PM
1use Mix.Config
2
3import_config "sys.exs"
4
5# Basic HTTP config
6config :sahnee,
7 ssl_prefix: "",
8 hostname: "sahnee.de",
9 port_https: 443,
10 port_http: 80
11
12# STUN/TURN server config
13config :sahnee, MongooseICE,
14 port: 4008,
15 host: "0.0.0.0"
16
17# Language configuration
18config :sahnee, Sahnee.I18N,
19 # All permitted languages.
20 lgs: [:en, :de],
21 # The default language of the site.
22 default_lg: :en
23
24config :sahnee, Sahnee.Game.Locher,
25 url: "https://locher.sahnee.de"
26
27config :sahnee, Sahnee.Game.Tree,
28 url: "https://tree.sahnee.de"
29
30config :sahnee, Sahnee.Ads,
31 id: "<google ads id here>"
32
33config :sahnee, Sahnee.Google,
34 id: "<google sign in id here>",
35 secret: "<google sign in secret here>"
36
37config :sahnee, Sahnee.Recaptcha,
38 id: "<google repatcha site key here>",
39 secret: "<google repatcha secret key here>"
40
41# Config for cross origin resource sharing (e.g. sim-locher sending saves to sahnee server)
42config :sahnee, Sahnee.Plug.Cors,
43 origins: [
44 www: "*",
45 sahnee: ~r/https:\/\/([a-z0-9-_\.]*\.)?sahnee\.de(:443)?$/,
46 locher: ~r/https:\/\/locher\.sahnee\.de(:443)?$/,
47 tree: ~r/https:\/\/tree\.sahnee\.de(:443)?$/
48 ],
49 safe_origin: "https://sahnee.de:443"
50
51# The database log in details.
52config :sahnee, Sahnee.Repo,
53 database: "<database name here>",
54 username: "<database user here>",
55 password: "<database password here>",
56 hostname: "localhost",
57 port: "5432"
58
59# Authentication options for token generation
60config :sahnee, Sahnee.Guardian,
61 bytes: 128,
62 hash: :sha256,
63 token_secret: "dev",
64 password_secret: "dev"
65
66config :sahnee, Sahnee.User,
67 mailchange_token: [
68 bytes: 128,
69 hash: :sha256,
70 secret: "dev-user-mailchange"
71 ],
72 signup_token: [
73 bytes: 128,
74 hash: :sha256,
75 secret: "dev-user-signup"
76 ],
77 delete_token: [
78 bytes: 128,
79 hash: :sha256,
80 secret: "dev-user-delete"
81 ],
82 forgotpassword_token: [
83 bytes: 128,
84 hash: :sha256,
85 secret: "dev-user-forgotpassword"
86 ]
87
88config :sahnee, Sahnee.Plug.Logger,
89 requestid_token: [
90 bytes: 64,
91 hash: :sha,
92 secret: "dev-logger"
93 ]
94
95config :sahnee, Sahnee.Mailer,
96 server: "smtp.my-mailer.com",
97 port: 1025,
98 username: "user",
99 password: "pass",
100 mail: "noreply@sahnee.de"
101
102#Config for the Backblaze Server
103# Needts to contain the keyid and the key for the bucket the files should be uploaded to
104config :sahnee, Sahnee.Backblaze,
105 app_key_id: "<YourKeyIDHere>",
106 app_key: "<YourKeyHere>",
107 error_retries: 11,
108 renewal_interval: 12 #in hours
109
110# Config for the primary HTTP router.
111config :sahnee, Sahnee.Endpoints.Router,
112 # The content security policy header to use.
113 # https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP
114 csp: "",
115 #csp: String.replace("
116 # default-src 'self' https://localhost:4001 wss://localhost:4002/* https://*.sahnee.de https://*.sahnee.dev;
117 # style-src https://cdn.jsdelivr.net 'unsafe-inline';
118 # font-src https://cdn.jsdelivr.net;
119 # script-src 'self' https://pagead2.googlesyndication.com https://adservice.google.de https://adservice.google.com https://www.googletagservices.com 'unsafe-inline';
120 # frame-src https://locher.sahnee.de https://tree.sahnee.de https://googleads.g.doubleclick.net;
121 #", "\n", ""),
122 # What should be done if a given request does not have an API matching it?
123 # * :static - Static files from /priv/dist should be served.
124 # * "any string" - Serve files using a reverse proxy.
125 fallback: :static,
126 # By default the :meta property of an SahneeError is not being sent over HTTP
127 # as it may contain sensitve information. Setting this value to true will send
128 # it regardless in the "meta" property.
129 send_error_meta: false
130
131config :sahnee, Sahnee.Endpoints.Blog.Router,
132 url: "https://sahnee.dev",
133 english_tag: 14,
134 german_tag: 16
135
136import_config "local.exs"