dev.exs 3.58 KB
Newer Older
Thomas Citharel's avatar
Thomas Citharel committed
1
import Config
Thomas Citharel's avatar
Thomas Citharel committed
2

rustra's avatar
rustra committed
3
config :mobilizon, Mobilizon.Web.Endpoint,
4
  http: [
Thomas Citharel's avatar
Thomas Citharel committed
5
    port: String.to_integer(System.get_env("MOBILIZON_INSTANCE_HOST_PORT", "4000"))
6
7
  ],
  url: [
8
    host: System.get_env("MOBILIZON_INSTANCE_HOST", "mobilizon.local"),
Thomas Citharel's avatar
Thomas Citharel committed
9
    port: String.to_integer(System.get_env("MOBILIZON_INSTANCE_HOST_PORT", "80")),
Thomas Citharel's avatar
Thomas Citharel committed
10
    scheme: "http"
11
  ],
12
  secret_key_base: System.get_env("MOBILIZON_INSTANCE_SECRET_KEY_BASE", "changethis"),
Thomas Citharel's avatar
Thomas Citharel committed
13
14
15
  debug_errors: true,
  code_reloader: true,
  check_origin: false,
16
  watchers: [
17
18
19
20
    node: [
      "node_modules/webpack/bin/webpack.js",
      "--mode",
      "development",
Thomas Citharel's avatar
Thomas Citharel committed
21
22
      "--watch",
      "--watch-options-stdin",
23
24
25
26
      "--config",
      "node_modules/@vue/cli-service/webpack.config.js",
      cd: Path.expand("../js", __DIR__)
    ]
27
  ]
Thomas Citharel's avatar
Thomas Citharel committed
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

# ## SSL Support
#
# In order to use HTTPS in development, a self-signed
# certificate can be generated by running the following
# command from your terminal:
#
#     openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" -keyout priv/server.key -out priv/server.pem
#
# The `http:` config above can be replaced with:
#
#     https: [port: 4000, keyfile: "priv/server.key", certfile: "priv/server.pem"],
#
# If desired, both `http:` and `https:` keys can be
# configured to run both http and https servers on
# different ports.

# Watch static and templates for browser reloading.
rustra's avatar
rustra committed
46
config :mobilizon, Mobilizon.Web.Endpoint,
Thomas Citharel's avatar
Thomas Citharel committed
47
48
49
50
  live_reload: [
    patterns: [
      ~r{priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$},
      ~r{priv/gettext/.*(po)$},
51
52
      ~r{lib/web/(live|views)/.*(ex)$},
      ~r{lib/web/templates/.*(eex)$}
Thomas Citharel's avatar
Thomas Citharel committed
53
54
55
56
57
58
    ]
  ]

# Do not include metadata nor timestamps in development logs
config :logger, :console, format: "[$level] $message\n", level: :debug

59
config :mobilizon, Mobilizon.Service.Geospatial, service: Mobilizon.Service.Geospatial.Nominatim
60

Thomas Citharel's avatar
Thomas Citharel committed
61
config :mobilizon, Mobilizon.Web.Gettext, allowed_locales: ["fr", "en", "ru", "ar"]
Thomas Citharel's avatar
Thomas Citharel committed
62

Thomas Citharel's avatar
Thomas Citharel committed
63
64
65
66
# Set a higher stacktrace during development. Avoid configuring such
# in production as building large stacktraces may be expensive.
config :phoenix, :stacktrace_depth, 20

67
68
69
# Initialize plugs at runtime for faster development compilation
config :phoenix, :plug_init_mode, :runtime

rustra's avatar
rustra committed
70
config :mobilizon, Mobilizon.Web.Email.Mailer, adapter: Bamboo.LocalAdapter
Thomas Citharel's avatar
Thomas Citharel committed
71

Thomas Citharel's avatar
Thomas Citharel committed
72
# Configure your database
miffy's avatar
miffy committed
73
config :mobilizon, Mobilizon.Storage.Repo,
74
75
76
77
  username: System.get_env("MOBILIZON_DATABASE_USERNAME", "mobilizon"),
  password: System.get_env("MOBILIZON_DATABASE_PASSWORD", "mobilizon"),
  database: System.get_env("MOBILIZON_DATABASE_DBNAME", "mobilizon_dev"),
  hostname: System.get_env("MOBILIZON_DATABASE_HOST", "localhost"),
78
  port: System.get_env("MOBILIZON_DATABASE_PORT", "5432"),
79
80
  pool_size: 10,
  show_sensitive_data_on_connection_error: true
81

82
83
84
85
86
config :mobilizon, :instance,
  name: System.get_env("MOBILIZON_INSTANCE_NAME", "Mobilizon"),
  hostname: System.get_env("MOBILIZON_INSTANCE_HOST", "Mobilizon"),
  email_from: System.get_env("MOBILIZON_INSTANCE_EMAIL"),
  email_reply_to: System.get_env("MOBILIZON_INSTANCE_EMAIL"),
Thomas Citharel's avatar
Thomas Citharel committed
87
88
  registrations_open: System.get_env("MOBILIZON_INSTANCE_REGISTRATIONS_OPEN") == "true",
  groups: true
89

90
91
92
config :mobilizon, Mobilizon.Web.Auth.Guardian,
  secret_key: System.get_env("MOBILIZON_INSTANCE_SECRET_KEY", "changethis")

93
# config :mobilizon, :activitypub, sign_object_fetches: false
94

95
96
config :mobilizon, Mobilizon.Web.Upload.Uploader.Local, uploads: "uploads"

97
98
config :mobilizon, :exports, path: "uploads/exports"

99
100
config :tz_world, data_dir: "_build/dev/lib/tz_world/priv"

101
102
103
104
config :mobilizon, :anonymous,
  reports: [
    allowed: true
  ]