Docker-Swarm-Loadbalancer/laravel/laravel.runit

35 lines
1 KiB
Text
Raw Normal View History

2023-03-01 17:32:51 +00:00
#!/usr/bin/env bash
rm -f /var/lock/laravel_ready
echo "[LARAVEL-FIXER] Fixing laravel application permissions"
mkdir -p /app/storage /app/bootstrap/cache
2021-11-12 16:43:41 +00:00
find /app/storage -type d -exec chmod 777 {} \;
find /app/bootstrap/cache -type d -exec chmod 777 {} \;
find /app/storage -type f -not -name ".gitignore" -exec chmod 666 {} \;
find /app/bootstrap/cache -type f -exec chmod 666 {} \;
2023-03-01 17:32:51 +00:00
touch /app/storage/logs/laravel.log
2021-11-12 16:43:41 +00:00
chmod 777 -R /app/storage
chmod +x /app/artisan
php /app/artisan package:discover
Trunk linter (#17) * linting is fun * mis-detection of missing healthcheck staements. * typo * disable tagging vanity tags on non-main branch * Unbugger node build? * Add gitleaks detector, remove an expired secret. * More linting-derived cleanup * Fiddle with trivy * Fiddle with trivy * add a readme * Fix build bug with php flavours * Marshall should build other flavours of ubuntu. * Fiddle with act cache location. * Add concurrency checks * Composer version gubbins for 7.0/7.1 * ubuntu is just a label, and injected over the top of. * Composer version gubbins for 7.0/7.1 * Run when workflow is altered too please. * Hopefully fix composer stage. * setup tooling meta-tooling. * Add trunk * Disable mirror mode, its being problematic, and increase retries to 5. * Revisit how ghcr login works. * Add trunk checks. * All hail the linter * Heavilly revise workflow * Fettling * Fettling * Fettling * Fettling * Fettling * Cleanup * Cleanup * Fettling.. Why does mitm build but not redis? * Fettling.. Why does mitm build but not redis? * Debuggin * Fettling. * Fix build? * Permissions are a pain * Switch around some should_push logic because envs aren't available that early. * Permissionssssss * Trivy, bane of my life * Fix merge? * Fix labels * Help node along, among other things * Redis 6.1 & 7.1 aren't a thing any more. * Ffff USER nonsense * latest-openssl doesn't exist. * fixup mysqlproxy. * Fix labels * uurrgh * uurrgh * Didn't need to add the mitmproxy user, it exists * Missing ghcr login * Missing backtick * Fix build? * Add validate build step to bouncer. * Fix bouncer build * Disable laravel build * Missing env * Fix swarm mon build * Scout just doesn't seem to work.
2024-02-07 15:21:14 +00:00
if [[ ${REGENERATE_KEYS,,} == "on" ]]; then
php /app/artisan key:generate
php /app/artisan passport:keys --force
2023-03-02 15:33:51 +00:00
fi
2023-03-01 17:32:51 +00:00
echo "[LARAVEL-FIXER] Waiting for mysql..."
/usr/bin/wait-for-mysql
echo "[LARAVEL-FIXER] Mysql Ready, Laravel Ready."
php /app/artisan wipe
2023-05-14 22:06:08 +00:00
2023-03-01 17:32:51 +00:00
touch /var/lock/laravel_ready
2021-11-12 16:43:41 +00:00
# Output the laravel log to the docker terminal.
2023-03-01 17:32:51 +00:00
tail -n0 -f /app/storage/logs/laravel-*.log /app/storage/logs/laravel.log &
2021-11-12 16:43:41 +00:00
# Sleep forever (and sleep again incase the sleep process is killed)
while true; do
Trunk linter (#17) * linting is fun * mis-detection of missing healthcheck staements. * typo * disable tagging vanity tags on non-main branch * Unbugger node build? * Add gitleaks detector, remove an expired secret. * More linting-derived cleanup * Fiddle with trivy * Fiddle with trivy * add a readme * Fix build bug with php flavours * Marshall should build other flavours of ubuntu. * Fiddle with act cache location. * Add concurrency checks * Composer version gubbins for 7.0/7.1 * ubuntu is just a label, and injected over the top of. * Composer version gubbins for 7.0/7.1 * Run when workflow is altered too please. * Hopefully fix composer stage. * setup tooling meta-tooling. * Add trunk * Disable mirror mode, its being problematic, and increase retries to 5. * Revisit how ghcr login works. * Add trunk checks. * All hail the linter * Heavilly revise workflow * Fettling * Fettling * Fettling * Fettling * Fettling * Cleanup * Cleanup * Fettling.. Why does mitm build but not redis? * Fettling.. Why does mitm build but not redis? * Debuggin * Fettling. * Fix build? * Permissions are a pain * Switch around some should_push logic because envs aren't available that early. * Permissionssssss * Trivy, bane of my life * Fix merge? * Fix labels * Help node along, among other things * Redis 6.1 & 7.1 aren't a thing any more. * Ffff USER nonsense * latest-openssl doesn't exist. * fixup mysqlproxy. * Fix labels * uurrgh * uurrgh * Didn't need to add the mitmproxy user, it exists * Missing ghcr login * Missing backtick * Fix build? * Add validate build step to bouncer. * Fix bouncer build * Disable laravel build * Missing env * Fix swarm mon build * Scout just doesn't seem to work.
2024-02-07 15:21:14 +00:00
sleep infinity
2021-11-12 16:43:41 +00:00
done