summaryrefslogtreecommitdiff
path: root/config/dev.exs
blob: 2c2821e1b7781aa69aadb074cab815a164564e0f (plain)
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
import Config

# Database configuration is now handled in runtime.exs
# using DB_ADAPTER and DATABASE_URL environment variables
config :silmataivas, Silmataivas.Repo, show_sensitive_data_on_connection_error: true

# OpenWeatherMap API configuration for development
config :silmataivas, :openweathermap_api_key, System.get_env("OPENWEATHERMAP_API_KEY")

# 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 can use it
# to bundle .js and .css sources.
# Binding to loopback ipv4 address prevents access from other machines.
config :silmataivas, SilmataivasWeb.Endpoint,
  # Change to `ip: {0, 0, 0, 0}` to allow access from other machines.
  http: [ip: {127, 0, 0, 1}, port: 4000],
  check_origin: false,
  code_reloader: true,
  debug_errors: true,
  secret_key_base: "2n9j4hR64BSG/CPD59PFf9u2obxbBtOJw2KMeJmXdQDwt4zOFyyIwWX7lamgQJhi",
  watchers: []

# ## SSL Support
#
# In order to use HTTPS in development, a self-signed
# certificate can be generated by running the following
# Mix task:
#
#     mix phx.gen.cert
#
# Run `mix help phx.gen.cert` for more information.
#
# The `http:` config above can be replaced with:
#
#     https: [
#       port: 4001,
#       cipher_suite: :strong,
#       keyfile: "priv/cert/selfsigned_key.pem",
#       certfile: "priv/cert/selfsigned.pem"
#     ],
#
# If desired, both `http:` and `https:` keys can be
# configured to run both http and https servers on
# different ports.

# Enable dev routes for dashboard and mailbox
config :silmataivas, dev_routes: true

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

# 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

# Disable swoosh api client as it is only required for production adapters.
config :swoosh, :api_client, Swoosh.ApiClient.Hackney

config :silmataivas, Silmataivas.Mailer,
  adapter: Swoosh.Adapters.AmazonSES,
  access_key: System.get_env("AWS_ACCESS_KEY_ID"),
  secret: System.get_env("AWS_SECRET_ACCESS_KEY"),
  region: "eu-central-1"

# Configure scheuler
config :silmataivas, Silmataivas.Scheduler,
  jobs: [
    #  {"0 * * * *", {Silmataivas.WeatherPoller, :check_all, []}}
    {"*/5 * * * *", {Silmataivas.WeatherPoller, :check_all, []}}
  ]