CaiWuXiTong/deploy/entrypoint.sh
WuYongJie 9595267ee7
Some checks failed
Tests / PHP 8.1 (push) Has been cancelled
Tests / PHP 8.2 (push) Has been cancelled
Tests / PHP 8.3 (push) Has been cancelled
chore: 导入 Akaunting 初始源码与团队协作规则
2026-07-20 18:20:25 +08:00

30 lines
611 B
Bash

#!/bin/sh
set -eu
mkdir -p \
storage/app/public \
storage/app/temp \
storage/app/uploads \
storage/framework/cache/data \
storage/framework/sessions \
storage/framework/views \
storage/logs \
bootstrap/cache
chown -R www-data:www-data storage bootstrap/cache
if [ -f .env ]; then
chown root:www-data .env
chmod 640 .env
fi
if [ "${1:-}" = "apache2-foreground" ]; then
sed -ri 's/^Listen 80$/Listen 18088/' /etc/apache2/ports.conf
php artisan optimize:clear
php artisan migrate --force
php artisan config:cache
php artisan view:cache
fi
exec "$@"