أُنشئ من Tokal/Test
Initial backend upload
هذا الالتزام موجود في:
21
docker/entrypoint.sh
Normal file
21
docker/entrypoint.sh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env sh
|
||||
set -e
|
||||
|
||||
cd /var/www/html
|
||||
|
||||
if [ ! -f .env ]; then
|
||||
cp .env.example .env
|
||||
fi
|
||||
|
||||
php artisan key:generate --force --no-interaction || true
|
||||
php artisan storage:link || true
|
||||
|
||||
if [ "${RUN_MIGRATIONS}" = "true" ]; then
|
||||
php artisan migrate --force --no-interaction
|
||||
fi
|
||||
|
||||
php artisan config:cache || true
|
||||
php artisan route:cache || true
|
||||
php artisan view:cache || true
|
||||
|
||||
exec "$@"
|
||||
26
docker/nginx/default.conf
Normal file
26
docker/nginx/default.conf
Normal file
@@ -0,0 +1,26 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
root /var/www/html/public;
|
||||
index index.php index.html;
|
||||
|
||||
client_max_body_size 20M;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
include fastcgi_params;
|
||||
fastcgi_pass app:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME /var/www/html/public$fastcgi_script_name;
|
||||
fastcgi_param DOCUMENT_ROOT /var/www/html/public;
|
||||
fastcgi_read_timeout 300;
|
||||
}
|
||||
|
||||
location ~* \.(jpg|jpeg|png|gif|css|js|ico|svg|webp)$ {
|
||||
expires 30d;
|
||||
access_log off;
|
||||
}
|
||||
}
|
||||
المرجع في مشكلة جديدة
حظر مستخدم