forked from beyond-all-reason/teiserver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdev.exs
121 lines (106 loc) · 3.23 KB
/
dev.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
import Config
config :central, Central.Setup, key: "dev_key"
# Configure your database
config :central, Teiserver.Repo,
username: "teiserver_dev",
password: "123456789",
database: "teiserver_dev",
hostname: "localhost",
show_sensitive_data_on_connection_error: true,
pool_size: 10,
timeout: 180_000
# For development, we disable any cache and enable
# debugging and code reloading.
#
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with webpack to recompile .js and .css sources.
config :central, TeiserverWeb.Endpoint,
http: [ip: {127, 0, 0, 1}, port: 4000],
debug_errors: true,
code_reloader: true,
check_origin: false,
watchers: [
# Start the esbuild watcher by calling Esbuild.install_and_run(:default, args)
esbuild: {Esbuild, :install_and_run, [:default, ~w(--sourcemap=inline --watch)]},
dark_sass: {
DartSass,
:install_and_run,
[:dark, ~w(--embed-source-map --source-map-urls=absolute --watch)]
},
light_sass: {
DartSass,
:install_and_run,
[:light, ~w(--embed-source-map --source-map-urls=absolute --watch)]
}
]
config :dart_sass,
version: "1.61.0",
light: [
args: ~w(scss/light.scss ../priv/static/assets/light.css),
cd: Path.expand("../assets", __DIR__)
],
dark: [
args: ~w(scss/dark.scss ../priv/static/assets/dark.css),
cd: Path.expand("../assets", __DIR__)
]
config :central, Teiserver,
certs: [
keyfile: "priv/certs/localhost.key",
certfile: "priv/certs/localhost.crt",
cacertfile: "priv/certs/localhost.crt"
],
ports: [
tcp: 8200,
tls: 8201
],
heartbeat_interval: nil,
heartbeat_timeout: nil,
enable_discord_bridge: false,
enable_hailstorm: true,
accept_all_emails: true
# Watch static and templates for browser reloading.
config :central, TeiserverWeb.Endpoint,
live_reload: [
patterns: [
~r"priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$",
~r"priv/gettext/.*(po)$",
~r"lib/central_web/(controllers|live|components|views|templates)/.*(ex|heex)$",
~r"lib/teiserver_web/(controllers|live|components|views|templates)/.*(ex|heex)$"
]
]
# Set a higher stacktrace during development. Avoid configuring such
# in production as building large stacktraces may be expensive.
config :phoenix, :stacktrace_depth, 20
# Initialize plugs at runtime for faster development compilation
config :phoenix, :plug_init_mode, :runtime
# Comment the below block to allow background jobs to happen in dev
config :central, Oban,
queues: false,
crontab: false
# Do not include metadata nor timestamps in development logs
config :logger, :console, format: "[$level] $message\n"
config :logger,
backends: [
{LoggerFileBackend, :error_log},
{LoggerFileBackend, :info_log},
:console
]
config :logger, :error_log,
path: "/tmp/teiserver_error.log",
format: "$time [$level] $metadata $message\n",
metadata: [:request_id, :user_id],
level: :error
config :logger, :info_log,
path: "/tmp/teiserver_info.log",
format: "$time [$level] $metadata $message\n",
metadata: [:request_id, :user_id],
level: :info
try do
import_config "dev.secret.exs"
rescue
_ in File.Error ->
nil
error ->
reraise error, __STACKTRACE__
end