From fb07be4ed773b373017e2f8793970b1d76f1dba7 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Fri, 5 Jul 2019 16:59:25 +0200 Subject: [PATCH] Final fixes for build Signed-off-by: Thomas Citharel --- config/prod.exs | 5 +++-- js/vue.config.js | 2 +- lib/mobilizon_web/router.ex | 2 +- lib/mobilizon_web/views/page_view.ex | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/config/prod.exs b/config/prod.exs index dde2a1fe8..79835c89b 100644 --- a/config/prod.exs +++ b/config/prod.exs @@ -4,11 +4,12 @@ config :mobilizon, MobilizonWeb.Endpoint, http: [:inet6, port: System.get_env("MOBILIZON_INSTANCE_PORT") || 4000], url: [ host: System.get_env("MOBILIZON_INSTANCE_HOST") || "mobilizon.me", - port: 80 + port: 443, + scheme: "https" ], secret_key_base: System.get_env("MOBILIZON_SECRET") || "ThisShouldBeAVeryStrongStringPleaseReplaceMe", - cache_static_manifest: "priv/static/js/manifest.json" + cache_static_manifest: "priv/static/manifest.json" # Configure your database config :mobilizon, Mobilizon.Repo, diff --git a/js/vue.config.js b/js/vue.config.js index 7ef5a5372..32315328d 100644 --- a/js/vue.config.js +++ b/js/vue.config.js @@ -9,7 +9,7 @@ module.exports = { }, lintOnSave: false, runtimeCompiler: true, - outputDir: '../priv/static/js', + outputDir: '../priv/static', configureWebpack: { plugins: [ new Dotenv({ path: path.resolve(process.cwd(), '../.env') }), diff --git a/lib/mobilizon_web/router.ex b/lib/mobilizon_web/router.ex index 3d57a7ff8..e70a0ccbb 100644 --- a/lib/mobilizon_web/router.ex +++ b/lib/mobilizon_web/router.ex @@ -31,7 +31,7 @@ defmodule MobilizonWeb.Router do end pipeline :browser do - plug(Plug.Static, at: "/", from: "priv/static/js") + plug(Plug.Static, at: "/", from: "priv/static") plug(:accepts, ["html"]) plug(:fetch_session) plug(:fetch_flash) diff --git a/lib/mobilizon_web/views/page_view.ex b/lib/mobilizon_web/views/page_view.ex index 6ec5c2f65..767dc877e 100644 --- a/lib/mobilizon_web/views/page_view.ex +++ b/lib/mobilizon_web/views/page_view.ex @@ -101,6 +101,6 @@ defmodule MobilizonWeb.PageView do end defp index_file_path() do - Path.join(Application.app_dir(:mobilizon, "priv/static/js"), "index.html") + Path.join(Application.app_dir(:mobilizon, "priv/static"), "index.html") end end