-
Notifications
You must be signed in to change notification settings - Fork 1
/
mix.exs
167 lines (160 loc) · 5.79 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
161
162
163
164
165
166
167
defmodule PhoenixContainerExample.MixProject do
use Mix.Project
def project do
[
app: :phoenix_container_example,
version: "0.1.0",
elixir: "~> 1.14",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
aliases: aliases(),
dialyzer: [
# plt_add_deps: :project,
plt_add_apps: [:mix, :ex_unit]
# 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, :eex] ++
extra_applications(Mix.env())
]
end
defp extra_applications(:dev), do: [:tools]
defp extra_applications(:test), do: [:tools]
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
[
{:appsignal_phoenix, "~> 2.0"},
# {:appsignal, "~> 2.0"},
{:aws_rds_castore, "~> 1.1"},
{:castore, "~> 1.0"},
{: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.8", runtime: Mix.env() == :dev},
{:ex_aws, "~> 2.5"},
{:excoveralls, "~> 0.18.0", only: [:dev, :test], runtime: false},
{:finch, "~> 0.14"},
{: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},
# {:libcluster_ecs, github: "pro-football-focus/libcluster_ecs"},
{:kubernetes_health_check, github: "cogini/kubernetes_health_check"},
# {:kubernetes_health_check, "~> 0.7.0"},
# {:logger_formatter_json, "~> 0.8.0"},
{:logger_formatter_json, github: "cogini/logger_formatter_json"},
{:mix_audit, "~> 2.0", only: [:dev, :test], runtime: false},
{:observer_cli, "~> 1.7"},
# tls_certificate_check needs to be started before opentelemetry_exporter
{:tls_certificate_check, "~> 1.13"},
# opentelemetry_exporter needs to be started before the other opentelemetry modules
{:opentelemetry_exporter, "~> 1.7"},
{:opentelemetry, "~> 1.4"},
{:opentelemetry_api, "~> 1.3"},
{:opentelemetry_ecto, "~> 1.0"},
# {:opentelemetry_logger_metadata, "~> 0.1.0"},
{:opentelemetry_cowboy, "~> 0.3.0"},
{:opentelemetry_liveview, "~> 1.0.0-rc.4"},
{:opentelemetry_phoenix, "~> 1.0"},
{:opentelemetry_xray, "~> 0.7.0"},
# {:opentelemetry_xray, github: "cogini/opentelemetry_xray"},
# {:opentelemetry_xray, path: "../../opentelemetry_xray", override: true},
{:phoenix, "~> 1.7.11"},
{:phoenix_ecto, "~> 4.4"},
{:phoenix_html, "~> 4.0"},
{:phoenix_live_dashboard, "~> 0.8.3"},
{:phoenix_live_reload, "~> 1.2", only: :dev},
{:phoenix_live_view, "~> 0.20.2"},
{:plug_cowboy, "~> 2.5"},
{:plugsnag, "~> 1.7"},
{:postgrex, ">= 0.0.0"},
{:recon, "~> 2.5"},
{:sobelow, "~> 0.13", only: [:dev, :test], runtime: false},
{:ssl_verify_fun, "~> 1.1"},
{:styler, "~> 0.11.0", only: [:dev, :test], runtime: false},
{:sweet_xml, "~> 0.6"},
{:swoosh, "~> 1.5"},
{:tailwind, "~> 0.2", runtime: Mix.env() == :dev},
{:telemetry_metrics, "~> 1.0"},
{:telemetry_metrics_prometheus, "~> 1.1"},
# {:telemetry_metrics_statsd, "~> 0.6.2"},
{:telemetry_poller, "~> 1.0"},
{:uinta, "~> 0.14.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.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: [
"test",
"format --check-formatted",
"credo",
# "credo --mute-exit-status",
# mix deps.clean --unlock --unused
"deps.unlock --check-unused",
# mix deps.update
# "hex.outdated",
# "hex.audit",
"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