forked from potsda.mn/mobilizon
fix: build pictures at correct location and fix Plug.Static
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
f24866012b
commit
3c288c5858
|
@ -10,6 +10,21 @@ defmodule Mobilizon.Web.Endpoint do
|
||||||
use Phoenix.Endpoint, otp_app: :mobilizon
|
use Phoenix.Endpoint, otp_app: :mobilizon
|
||||||
use Absinthe.Phoenix.Endpoint
|
use Absinthe.Phoenix.Endpoint
|
||||||
|
|
||||||
|
# Serve at "/" the static files from "priv/static" directory.
|
||||||
|
#
|
||||||
|
# You should set gzip to true if you are running phoenix.digest
|
||||||
|
# when deploying your static files in production.
|
||||||
|
plug(
|
||||||
|
Plug.Static,
|
||||||
|
at: "/",
|
||||||
|
from: {:mobilizon, "priv/static"},
|
||||||
|
gzip: false,
|
||||||
|
only: Mobilizon.Web.static_paths()
|
||||||
|
# only_matching: ["precache-manifest"]
|
||||||
|
)
|
||||||
|
|
||||||
|
plug(Mobilizon.Web.Plugs.UploadedMedia)
|
||||||
|
|
||||||
plug(Mobilizon.Web.Plugs.DetectLocalePlug)
|
plug(Mobilizon.Web.Plugs.DetectLocalePlug)
|
||||||
|
|
||||||
if Application.compile_env(:mobilizon, :env) !== :dev do
|
if Application.compile_env(:mobilizon, :env) !== :dev do
|
||||||
|
@ -37,21 +52,6 @@ defmodule Mobilizon.Web.Endpoint do
|
||||||
do: RemoteIp
|
do: RemoteIp
|
||||||
)
|
)
|
||||||
|
|
||||||
plug(Mobilizon.Web.Plugs.UploadedMedia)
|
|
||||||
|
|
||||||
# Serve at "/" the static files from "priv/static" directory.
|
|
||||||
#
|
|
||||||
# You should set gzip to true if you are running phoenix.digest
|
|
||||||
# when deploying your static files in production.
|
|
||||||
plug(
|
|
||||||
Plug.Static,
|
|
||||||
at: "/",
|
|
||||||
from: {:mobilizon, "priv/static"},
|
|
||||||
gzip: false,
|
|
||||||
only: Mobilizon.Web.static_paths(),
|
|
||||||
only_matching: ["precache-manifest"]
|
|
||||||
)
|
|
||||||
|
|
||||||
# Code reloading can be explicitly enabled under the
|
# Code reloading can be explicitly enabled under the
|
||||||
# :code_reloader configuration of your endpoint.
|
# :code_reloader configuration of your endpoint.
|
||||||
if code_reloading? do
|
if code_reloading? do
|
||||||
|
|
|
@ -72,7 +72,6 @@ defmodule Mobilizon.Web.Router do
|
||||||
|
|
||||||
pipeline :browser do
|
pipeline :browser do
|
||||||
plug(:put_request_context)
|
plug(:put_request_context)
|
||||||
plug(Plug.Static, at: "/", from: "priv/static")
|
|
||||||
|
|
||||||
plug(Mobilizon.Web.Plugs.SetLocalePlug)
|
plug(Mobilizon.Web.Plugs.SetLocalePlug)
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
output_dir="../priv/static/img/pics"
|
output_dir="priv/static/img/pics"
|
||||||
resolutions=(
|
resolutions=(
|
||||||
480
|
480
|
||||||
1024
|
1024
|
||||||
|
|
Loading…
Reference in a new issue