Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
elixir 1.13.3-otp-24
erlang 24.2.2
elixir 1.14.1-otp-25
erlang 25.3.2.16
nodejs 14.20.1
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -----------------------------------------------
# 1) Build Elixir
# -----------------------------------------------
FROM elixir:1.13.3-slim as build-elixir
FROM elixir:1.15 as build-elixir

# ARG is available during the build and not in the final container
# https://vsupalov.com/docker-arg-vs-env/
Expand Down Expand Up @@ -58,7 +58,7 @@ RUN set -xe; \
# -----------------------------------------------
# 4) Build final release image
# -----------------------------------------------
FROM debian:11.6-slim as release
FROM debian:12-slim as release

ARG APP_NAME=recognizer

Expand Down
4 changes: 4 additions & 0 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -97,4 +97,8 @@ config :spandex, :decorators, tracer: Recognizer.Tracer

config :recognizer, Recognizer.Accounts, cache_expiry: 60 * 15

config :recognizer, RecognizerWeb.Gettext,
default_locale: "en",
locales: ~w(en fr de es)

import_config "#{Mix.env()}.exs"
2 changes: 1 addition & 1 deletion lib/recognizer_web/endpoint.ex
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ defmodule RecognizerWeb.Endpoint do
plug Plug.Static,
at: "/",
from: :recognizer,
gzip: Application.get_env(:recognizer, __MODULE__)[:gzip],
gzip: Application.compile_env(:recognizer, __MODULE__, [])[:gzip],
only: ~w(styles fonts images scripts favicon.ico robots.txt)

# Code reloading can be explicitly enabled under the
Expand Down
2 changes: 1 addition & 1 deletion lib/recognizer_web/gettext.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ defmodule RecognizerWeb.Gettext do

See the [Gettext Docs](https://hexdocs.pm/gettext) for detailed usage.
"""
use Gettext, otp_app: :recognizer
use Gettext.Backend, otp_app: :recognizer
end
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ defmodule Recognizer.MixProject do
defp deps do
[
{:argon2_elixir, "~> 2.0"},
{:bottle, github: "system76/bottle", ref: "1a49e7bc7d8f7bf556c5780b70e9eb60a06a8ca7"},
{:bottle, github: "system76/bottle", ref: "4654c83d58c0323f9ad40a8e3cdab8fe2c0110e6"},
{:cors_plug, "~> 2.0"},
{:cowboy, "~> 2.8", override: true},
{:cowlib, "~> 2.9.1", override: true},
Expand Down
92 changes: 44 additions & 48 deletions mix.lock

Large diffs are not rendered by default.