Copy the nginx config to the release directory
authorrinpatch <rinpatch@sdf.org>
Fri, 21 Jun 2019 02:46:47 +0000 (05:46 +0300)
committerrinpatch <rinpatch@sdf.org>
Fri, 21 Jun 2019 02:46:47 +0000 (05:46 +0300)
mix.exs

diff --git a/mix.exs b/mix.exs
index 9fdf6e83a3016098452a92fd6feed569352e486e..dc2df01a2a05f48a42019dbfa8d91f81c1982804 100644 (file)
--- a/mix.exs
+++ b/mix.exs
@@ -37,7 +37,7 @@ defmodule Pleroma.Mixfile do
         pleroma: [
           include_executables_for: [:unix],
           applications: [ex_syslogger: :load, syslog: :load],
-          steps: [:assemble, &copy_files/1]
+          steps: [:assemble, &copy_files/1, &copy_nginx_config/1]
         ]
       ]
     ]
@@ -48,6 +48,11 @@ defmodule Pleroma.Mixfile do
     release
   end
 
+  def copy_nginx_config(%{path: target_path} = release) do
+    File.cp!("./installation/pleroma.nginx", Path.join([target_path, "installation", "pleroma.nginx"]))
+    release
+  end
+
   # Configuration for the OTP application.
   #
   # Type `mix help compile.app` for more information.