our static/labels directory doesn't survive past compilation when dockerized, ensure it does
This commit is contained in:
@@ -4,7 +4,6 @@ defmodule LabelmakerWeb.LabelController do
|
|||||||
alias LabelmakerWeb.Tools
|
alias LabelmakerWeb.Tools
|
||||||
|
|
||||||
@label_dir Path.join(:code.priv_dir(:labelmaker), "static/labels")
|
@label_dir Path.join(:code.priv_dir(:labelmaker), "static/labels")
|
||||||
File.mkdir_p!(@label_dir)
|
|
||||||
|
|
||||||
def show(conn, params) do
|
def show(conn, params) do
|
||||||
options = Tools.process_parameters(params)
|
options = Tools.process_parameters(params)
|
||||||
@@ -28,6 +27,8 @@ defmodule LabelmakerWeb.LabelController do
|
|||||||
end
|
end
|
||||||
|
|
||||||
defp generate_image(options, filepath) do
|
defp generate_image(options, filepath) do
|
||||||
|
File.mkdir_p!(@label_dir)
|
||||||
|
|
||||||
args = [
|
args = [
|
||||||
"-background",
|
"-background",
|
||||||
"none",
|
"none",
|
||||||
|
|||||||
Reference in New Issue
Block a user