Skip to content

Commit a5fe4d5

Browse files
committed
Update entrypoint.sh
1 parent b4f6025 commit a5fe4d5

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

entrypoint.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ set -e
44
ASPNETCORE_URLS="${ASPNETCORE_URLS:-http://0.0.0.0:8080}"
55
NEXT_PORT="${NEXT_PORT:-3000}"
66

7+
# If running an AppTask (e.g. --AppTasks=migrate), run only the .NET app and exit
8+
if [[ "$*" == *"--AppTasks"* ]]; then
9+
echo "Running AppTask with args: $*"
10+
ASPNETCORE_CONTENTROOT="/app/api" ASPNETCORE_URLS="${ASPNETCORE_URLS}" \
11+
dotnet /app/api/TechStacks.dll "$@"
12+
exit $?
13+
fi
14+
715
echo "Starting ASP.NET Core on ${ASPNETCORE_URLS}..."
816
DOTNET_ENV_VARS=("ASPNETCORE_URLS=${ASPNETCORE_URLS}")
917

@@ -36,4 +44,3 @@ EXIT_CODE=$?
3644

3745
echo "One of the processes exited with code ${EXIT_CODE}, shutting down the other..."
3846
term_handler
39-

0 commit comments

Comments
 (0)