Skip to content

Commit 03486b1

Browse files
committed
Bump langauge and dependencies' versions
1 parent b8e2bfa commit 03486b1

6 files changed

Lines changed: 136 additions & 94 deletions

File tree

.tool-versions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
elixir 1.12.2-otp-24
2-
erlang 24.0.3
1+
elixir 1.14.4-otp-25
2+
erlang 25.2.2
33
nodejs 16.3.0
44
python 3.9.4

config/runtime.exs

Lines changed: 63 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -284,66 +284,73 @@ config :plausible, PlausibleWeb.Firewall,
284284
|> String.split(",")
285285
|> Enum.map(&String.trim/1)
286286

287-
if config_env() == :prod && !disable_cron do
288-
base_cron = [
289-
# Daily at midnight
290-
{"0 0 * * *", Plausible.Workers.RotateSalts},
291-
#  hourly
292-
{"0 * * * *", Plausible.Workers.ScheduleEmailReports},
293-
# hourly
294-
{"0 * * * *", Plausible.Workers.SendSiteSetupEmails},
295-
# Daily at midday
296-
{"0 12 * * *", Plausible.Workers.SendCheckStatsEmails},
297-
# Every 15 minutes
298-
{"*/15 * * * *", Plausible.Workers.SpikeNotifier},
299-
# Every day at midnight
300-
{"0 0 * * *", Plausible.Workers.CleanEmailVerificationCodes},
301-
# Every day at 1am
302-
{"0 1 * * *", Plausible.Workers.CleanInvitations}
303-
]
287+
cond do
288+
config_env() == :prod && !disable_cron ->
289+
base_cron = [
290+
# Daily at midnight
291+
{"0 0 * * *", Plausible.Workers.RotateSalts},
292+
#  hourly
293+
{"0 * * * *", Plausible.Workers.ScheduleEmailReports},
294+
# hourly
295+
{"0 * * * *", Plausible.Workers.SendSiteSetupEmails},
296+
# Daily at midday
297+
{"0 12 * * *", Plausible.Workers.SendCheckStatsEmails},
298+
# Every 15 minutes
299+
{"*/15 * * * *", Plausible.Workers.SpikeNotifier},
300+
# Every day at midnight
301+
{"0 0 * * *", Plausible.Workers.CleanEmailVerificationCodes},
302+
# Every day at 1am
303+
{"0 1 * * *", Plausible.Workers.CleanInvitations}
304+
]
304305

305-
extra_cron = [
306-
# Daily at midday
307-
{"0 12 * * *", Plausible.Workers.SendTrialNotifications},
308-
# Daily at 14
309-
{"0 14 * * *", Plausible.Workers.CheckUsage},
310-
# Daily at 15
311-
{"0 15 * * *", Plausible.Workers.NotifyAnnualRenewal},
312-
# Every midnight
313-
{"0 0 * * *", Plausible.Workers.LockSites}
314-
]
306+
extra_cron = [
307+
# Daily at midday
308+
{"0 12 * * *", Plausible.Workers.SendTrialNotifications},
309+
# Daily at 14
310+
{"0 14 * * *", Plausible.Workers.CheckUsage},
311+
# Daily at 15
312+
{"0 15 * * *", Plausible.Workers.NotifyAnnualRenewal},
313+
# Every midnight
314+
{"0 0 * * *", Plausible.Workers.LockSites}
315+
]
315316

316-
base_queues = [
317-
rotate_salts: 1,
318-
schedule_email_reports: 1,
319-
send_email_reports: 1,
320-
spike_notifications: 1,
321-
check_stats_emails: 1,
322-
site_setup_emails: 1,
323-
clean_email_verification_codes: 1,
324-
clean_invitations: 1,
325-
google_analytics_imports: 1
326-
]
317+
base_queues = [
318+
rotate_salts: 1,
319+
schedule_email_reports: 1,
320+
send_email_reports: 1,
321+
spike_notifications: 1,
322+
check_stats_emails: 1,
323+
site_setup_emails: 1,
324+
clean_email_verification_codes: 1,
325+
clean_invitations: 1,
326+
google_analytics_imports: 1
327+
]
327328

328-
extra_queues = [
329-
provision_ssl_certificates: 1,
330-
trial_notification_emails: 1,
331-
check_usage: 1,
332-
notify_annual_renewal: 1,
333-
lock_sites: 1
334-
]
329+
extra_queues = [
330+
provision_ssl_certificates: 1,
331+
trial_notification_emails: 1,
332+
check_usage: 1,
333+
notify_annual_renewal: 1,
334+
lock_sites: 1
335+
]
335336

336-
# Keep 30 days history
337-
config :plausible, Oban,
338-
repo: Plausible.Repo,
339-
plugins: [{Oban.Plugins.Pruner, max_age: 2_592_000}],
340-
queues: if(is_selfhost, do: base_queues, else: base_queues ++ extra_queues),
341-
crontab: if(is_selfhost, do: base_cron, else: base_cron ++ extra_cron)
342-
else
343-
config :plausible, Oban,
344-
repo: Plausible.Repo,
345-
queues: [google_analytics_imports: 1],
346-
plugins: false
337+
# Keep 30 days history
338+
config :plausible, Oban,
339+
repo: Plausible.Repo,
340+
plugins: [{Oban.Plugins.Pruner, max_age: 2_592_000}],
341+
queues: if(is_selfhost, do: base_queues, else: base_queues ++ extra_queues),
342+
crontab: if(is_selfhost, do: base_cron, else: base_cron ++ extra_cron)
343+
344+
config_env() == :test ->
345+
config :plausible, Oban,
346+
repo: Plausible.Repo,
347+
testing: :inline
348+
349+
true ->
350+
config :plausible, Oban,
351+
repo: Plausible.Repo,
352+
queues: [google_analytics_imports: 1],
353+
plugins: []
347354
end
348355

349356
config :plausible, :hcaptcha,

mix.exs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ defmodule Plausible.MixProject do
55
[
66
app: :plausible,
77
version: System.get_env("APP_VERSION", "0.0.1"),
8-
elixir: "~> 1.11",
8+
elixir: "~> 1.14",
99
elixirc_paths: elixirc_paths(Mix.env()),
1010
compilers: [:phoenix] ++ Mix.compilers(),
1111
start_permanent: Mix.env() == :prod,
@@ -55,21 +55,23 @@ defmodule Plausible.MixProject do
5555
{:bcrypt_elixir, "~> 2.0"},
5656
{:combination, "~> 0.0.3"},
5757
{:cors_plug, "~> 2.0"},
58-
{:ecto_sql, "~> 3.0"},
58+
{:ecto_sql, "~> 3.7.0"},
5959
{:elixir_uuid, "~> 1.2", only: :test},
6060
{:jason, "~> 1.3", override: true},
61-
{:phoenix, "~> 1.5.0"},
61+
{:phoenix, "~> 1.6.16"},
6262
{:phoenix_ecto, "~> 4.0"},
63-
{:phoenix_html, "~> 2.12"},
63+
{:phoenix_html, "~> 3.3", override: true},
6464
{:phoenix_live_reload, "~> 1.2", only: :dev},
6565
{:phoenix_pubsub, "~> 2.0"},
66-
{:plug_cowboy, "~> 2.3"},
66+
{:plug, "~> 1.14", override: true},
67+
{:plug_cowboy, "~> 2.6"},
6768
{:postgrex, ">= 0.0.0"},
6869
{:ref_inspector, "~> 1.3"},
69-
{:timex, "~> 3.6"},
70+
{:timex, "~> 3.7"},
71+
{:gettext, "~> 0.20.0", override: true},
7072
{:ua_inspector, "~> 2.2"},
7173
{:bamboo, "~> 2.2"},
72-
{:hackney, "~> 1.8"},
74+
{:hackney, "~> 1.18"},
7375
{:bamboo_phoenix, "~> 1.0.0"},
7476
{:bamboo_postmark, git: "https://github.com/pablo-co/bamboo_postmark.git", tag: "master"},
7577
{:bamboo_smtp, "~> 4.1"},
@@ -83,14 +85,14 @@ defmodule Plausible.MixProject do
8385
{:oauther, "~> 1.3"},
8486
{:nanoid, "~> 2.0.2"},
8587
{:siphash, "~> 3.2"},
86-
{:oban, "~> 2.0"},
88+
{:oban, "~> 2.12.0"},
8789
{:geolix, "~> 1.0"},
8890
{:clickhouse_ecto, git: "https://github.com/Recruitee/clickhouse_ecto.git", ref: "ed45cd0"},
8991
{:location, git: "https://github.com/plausible/location.git"},
9092
{:geolix_adapter_mmdb2, "~> 0.5.0"},
9193
{:cachex, "~> 3.4"},
9294
{:dialyxir, "~> 1.0", only: [:dev, :test], runtime: false},
93-
{:credo, "~> 1.5", only: [:dev, :test], runtime: false},
95+
{:credo, "~> 1.6", only: [:dev, :test], runtime: false},
9496
{:kaffy, "~> 0.9.0"},
9597
{:envy, "~> 1.1.1"},
9698
{:phoenix_pagination, "~> 0.7.0"},

0 commit comments

Comments
 (0)