From 50e9a9de3f2d8769f46c018a1cd2ce42dc1311aa Mon Sep 17 00:00:00 2001 From: James Greenwood Date: Mon, 17 Nov 2025 09:49:40 +0000 Subject: [PATCH] fix --- lib/action_requests_demo/release.ex | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/action_requests_demo/release.ex b/lib/action_requests_demo/release.ex index 7a68a66..4069918 100644 --- a/lib/action_requests_demo/release.ex +++ b/lib/action_requests_demo/release.ex @@ -12,12 +12,14 @@ defmodule ActionRequestsDemo.Release do @doc """ Run the database seeds script inside a release. - Ensures the main application and Faker are started, then evaluates - the standard `priv/repo/seeds.exs` file. + This is designed to be run against a *running* release (e.g. via + `bin/action_requests_demo eval ...` inside your Docker container), + so it does **not** try to start the application or endpoint again. + It only ensures Faker is running, then evaluates the standard + `priv/repo/seeds.exs` file, which uses `ActionRequestsDemo.Repo`. """ def seed do - # Make sure the application (and its supervision tree) is running - {:ok, _} = Application.ensure_all_started(@app) + # Ensure Faker is started in this eval process so Faker.Person.name/0 works {:ok, _} = Application.ensure_all_started(:faker) seeds_path = Application.app_dir(@app, "priv/repo/seeds.exs")