From 44266b950b0b1685df8ce6d57705b6f37cf90cc6 Mon Sep 17 00:00:00 2001 From: Christian Winther Date: Wed, 17 Jan 2024 14:29:24 +0000 Subject: [PATCH] conditionally initialize passport and instance actor --- .../root/docker/entrypoint.d/11-first-time-setup.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docker/shared/root/docker/entrypoint.d/11-first-time-setup.sh b/docker/shared/root/docker/entrypoint.d/11-first-time-setup.sh index 9559eb4de..41e28b5ae 100755 --- a/docker/shared/root/docker/entrypoint.d/11-first-time-setup.sh +++ b/docker/shared/root/docker/entrypoint.d/11-first-time-setup.sh @@ -19,7 +19,15 @@ fi load-config-files await-database-ready -only-once "storage:link" run-as-runtime-user php artisan storage:link only-once "key:generate" run-as-runtime-user php artisan key:generate +only-once "storage:link" run-as-runtime-user php artisan storage:link only-once "initial:migrate" run-as-runtime-user php artisan migrate --force only-once "import:cities" run-as-runtime-user php artisan import:cities + +if is-true "${ACTIVITY_PUB:-false}"; then + only-once "instance:actor" run-as-runtime-user php artisan instance:actor +fi + +if is-true "${OAUTH_ENABLED:-false}"; then + only-once "passport:keys" run-as-runtime-user php artisan passport:keys +fi