-
Notifications
You must be signed in to change notification settings - Fork 4
/
mix.exs
160 lines (153 loc) · 5.56 KB
/
mix.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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
defmodule PhoenixContainerExample.MixProject do
use Mix.Project
def project do
[
app: :phoenix_container_example,
version: "0.1.0",
elixir: "~> 1.13",
elixirc_paths: elixirc_paths(Mix.env()),
# elixirc_options: [warnings_as_errors: Mix.env() != :dev],
build_embedded: Mix.env() == :prod,
start_permanent: Mix.env() == :prod,
aliases: aliases(),
dialyzer: [
# plt_add_deps: :project,
# plt_add_apps: [:ssl, :mnesia, :compiler, :xmerl, :inets],
plt_add_apps: [:mix, :ex_unit]
# plt_add_apps: [:poison],
# plt_add_deps: true,
# flags: ["-Werror_handling", "-Wrace_conditions"],
# flags: ["-Wunmatched_returns", :error_handling, :race_conditions, :underspecs],
# ignore_warnings: "dialyzer.ignore-warnings"
],
test_coverage: [tool: ExCoveralls],
preferred_cli_env: [
coveralls: :test,
"coveralls.detail": :test,
"coveralls.post": :test,
"coveralls.html": :test,
"coveralls.lcov": :test,
quality: :test,
"quality.ci": :test,
"assets.deploy": :prod,
deploy: :prod
],
default_release: :prod,
releases: releases(),
deps: deps()
]
end
def application do
[
mod: {PhoenixContainerExample.Application, []},
extra_applications:
[:logger, :runtime_tools, :inets, :gproc, :ssl, :eex] ++
extra_applications(Mix.env())
]
end
defp extra_applications(:dev), do: [:tools]
defp extra_applications(:test), do: [:tools]
defp extra_applications(:prod), do: [:logger_formatter_json]
defp extra_applications(_), do: []
defp elixirc_paths(:dev), do: ["lib", "test/support"]
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp releases do
[
prod: [
reboot_system_after_config: true,
include_executables_for: [:unix],
# Don't need to tar if we are just going to copy it
# steps: [:assemble, :tar]
applications: [opentelemetry_exporter: :permanent, opentelemetry: :temporary]
]
]
end
defp deps do
[
{:ex_aws, "~> 2.5"},
{:aws_rds_castore, "~> 1.1"},
{:credo, "~> 1.6", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.2", only: [:dev, :test], runtime: false},
{:dns_cluster, "~> 0.1.1"},
{:ecto_sql, "~> 3.10"},
{:esbuild, "~> 0.7", runtime: Mix.env() == :dev},
{:excoveralls, "~> 0.14", only: [:dev, :test], runtime: false},
{:finch, "~> 0.13"},
{:flatlog, "~> 0.1.2"},
{:floki, ">= 0.30.0", only: :test},
{:gen_smtp, "~> 1.0"},
{:gettext, "~> 0.20"},
{:hackney, "~> 1.9"},
{:jason, "~> 1.2"},
{:junit_formatter, "~> 3.3", only: [:dev, :test], runtime: false},
{:logger_formatter_json, "~> 0.7.0"},
{:mix_audit, "~> 2.0", only: [:dev, :test], runtime: false},
{:observer_cli, "~> 1.7"},
# opentelemetry_exporter and tls_certificate_check are before the opentelemetry
# modules so they will be started first.
{:tls_certificate_check, "~> 1.13"},
{:opentelemetry_exporter, "~> 1.1"},
{:opentelemetry, "~> 1.1"},
{:opentelemetry_api, "~> 1.1"},
{:opentelemetry_ecto, "~> 1.0"},
{:opentelemetry_logger_metadata, "~> 0.1.0"},
{:opentelemetry_cowboy, "~> 0.2.1"},
{:opentelemetry_liveview, "~> 1.0.0-rc.4"},
{:opentelemetry_phoenix, "~> 1.0"},
{:opentelemetry_xray, github: "cogini/opentelemetry_xray"},
{:phoenix, "~> 1.6.11"},
{:phoenix_ecto, "~> 4.4"},
{:phoenix_html, "~> 3.0"},
{:phoenix_live_dashboard, "~> 0.6"},
{:phoenix_live_reload, "~> 1.2", only: :dev},
{:phoenix_live_view, "~> 0.17.7"},
{:plug_cowboy, "~> 2.5"},
{:postgrex, ">= 0.0.0"},
{:sobelow, "~> 0.13", only: [:dev, :test], runtime: false},
{:styler, "~> 0.9.6", only: [:dev, :test], runtime: false},
{:sweet_xml, "~> 0.6"},
{:swoosh, "~> 1.3"},
{:tailwind, "~> 0.2.0", runtime: Mix.env() == :dev},
{:telemetry_metrics, "~> 0.6"},
{:telemetry_metrics_prometheus, "~> 1.1"},
# {:telemetry_metrics_statsd, "~> 0.6.2"},
{:telemetry_poller, "~> 1.0"},
{:uinta, "~> 0.11.0"}
]
end
defp aliases do
[
setup: ["deps.get", "ecto.setup", "assets.setup", "assets.build"],
"ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"],
"ecto.reset": ["ecto.drop", "ecto.setup"],
test: ["ecto.create --quiet", "ecto.migrate --quiet", "test"],
"assets.deploy": ["esbuild default --minify", "phx.digest"],
# "assets.deploy": ["yarn --cwd assets deploy", "phx.digest"],
# "assets.setup": ["tailwind.install --if-missing", "esbuild.install --if-missing"],
# "assets.build": ["tailwind default", "esbuild default"],
# "assets.deploy": ["tailwind default --minify", "esbuild default --minify", "phx.digest"]
quality: [
"format --check-formatted",
"credo",
# mix deps.clean --unlock --unused
"deps.unlock --check-unused",
# mix deps.update
# "hex.outdated",
"deps.audit",
"sobelow --exit --quiet --skip -i DOS.StringToAtom,Config.HTTPS",
"dialyzer --quiet-with-result"
],
"quality.ci": [
"format --check-formatted",
"deps.unlock --check-unused",
# "hex.outdated",
"hex.audit",
"deps.audit",
"credo",
"sobelow --exit --quiet --skip -i DOS.StringToAtom,Config.HTTPS",
"dialyzer --quiet-with-result"
]
]
end
end