our static/labels directory doesn't survive past compilation when dockerized, ensure it does

This commit is contained in:
Gavin McDonald
2025-05-12 09:14:44 -04:00
parent 44fd876044
commit 6e1a25b5d6

View File

@@ -4,7 +4,6 @@ defmodule LabelmakerWeb.LabelController do
alias LabelmakerWeb.Tools
@label_dir Path.join(:code.priv_dir(:labelmaker), "static/labels")
File.mkdir_p!(@label_dir)
def show(conn, params) do
options = Tools.process_parameters(params)
@@ -28,6 +27,8 @@ defmodule LabelmakerWeb.LabelController do
end
defp generate_image(options, filepath) do
File.mkdir_p!(@label_dir)
args = [
"-background",
"none",