mirror of
https://github.com/tiennm99/composes.git
synced 2026-10-11 03:13:16 +00:00
feat: update
This commit is contained in:
1 parent
12529023e1
commit
3e58b95b6c
4 files changed
+56
-40
No files matched your search
@@ -30,8 +30,8 @@ services:
|
||||
# Scheduler and Queue
|
||||
- QUEUE_CONNECTION=database
|
||||
volumes:
|
||||
- ./:/var/www/html
|
||||
- ./storage:/var/www/html/storage
|
||||
- tastyigniter:/var/www/html
|
||||
- tastyigniter-storage:/var/www/html/storage
|
||||
depends_on:
|
||||
- db
|
||||
networks:
|
||||
@@ -44,8 +44,8 @@ services:
|
||||
# ports:
|
||||
# - "80:80"
|
||||
volumes:
|
||||
- ./:/var/www/html
|
||||
- ./docker/nginx:/etc/nginx/conf.d
|
||||
- tastyigniter:/var/www/html
|
||||
- ./docker/nginx/site.conf:/etc/nginx/conf.d/default.conf
|
||||
depends_on:
|
||||
- app
|
||||
networks:
|
||||
@@ -73,7 +73,7 @@ services:
|
||||
restart: unless-stopped
|
||||
command: bash -c "while true; do php /var/www/html/artisan schedule:run --verbose --no-interaction; sleep 60; done"
|
||||
volumes:
|
||||
- ./:/var/www/html
|
||||
- tastyigniter:/var/www/html
|
||||
depends_on:
|
||||
- app
|
||||
networks:
|
||||
@@ -87,7 +87,7 @@ services:
|
||||
restart: unless-stopped
|
||||
command: php /var/www/html/artisan queue:work
|
||||
volumes:
|
||||
- ./:/var/www/html
|
||||
- tastyigniter:/var/www/html
|
||||
depends_on:
|
||||
- app
|
||||
networks:
|
||||
@@ -95,6 +95,8 @@ services:
|
||||
|
||||
volumes:
|
||||
dbdata:
|
||||
tastyigniter:
|
||||
tastyigniter-storage:
|
||||
|
||||
networks:
|
||||
tastyigniter-network:
|
||||
|
||||
@@ -40,6 +40,36 @@ else
|
||||
echo "TastyIgniter already installed"
|
||||
fi
|
||||
|
||||
# Check for TastyIgniter's .nginx.conf file and copy it if needed
|
||||
if [ -f /var/www/html/.nginx.conf ]; then
|
||||
echo "TastyIgniter .nginx.conf found"
|
||||
else
|
||||
echo "TastyIgniter .nginx.conf not found, creating a default one"
|
||||
cat > /var/www/html/.nginx.conf <<EOF
|
||||
# Default TastyIgniter nginx config
|
||||
location / {
|
||||
root /var/www/html/public;
|
||||
try_files \$uri \$uri/ /index.php?\$query_string;
|
||||
index index.php;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
root /var/www/html/public;
|
||||
try_files \$uri \$uri/ /index.php?\$query_string;
|
||||
fastcgi_pass app:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_buffers 16 16k;
|
||||
fastcgi_buffer_size 32k;
|
||||
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
EOF
|
||||
fi
|
||||
|
||||
# Set permissions again to ensure proper access
|
||||
chown -R www-data:www-data /var/www/html
|
||||
chmod -R 755 /var/www/html/storage
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
server {
|
||||
listen 80;
|
||||
index index.php index.html;
|
||||
server_name _;
|
||||
root /var/www/html/public;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass app:9000;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location ~ /\.(?!well-known).* {
|
||||
deny all;
|
||||
}
|
||||
|
||||
gzip on;
|
||||
gzip_proxied expired no-cache no-store private auth;
|
||||
gzip_types text/plain text/css application/x-javascript application/json application/javascript image/x-icon image/png image/gif image/jpeg image/svg+xml;
|
||||
|
||||
client_max_body_size 20M;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
|
||||
root /var/www/html;
|
||||
index index.php;
|
||||
|
||||
gzip on;
|
||||
gzip_proxied expired no-cache no-store private auth;
|
||||
gzip_types text/plain text/css application/x-javascript application/json application/javascript image/x-icon image/png image/gif image/jpeg image/svg+xml;
|
||||
|
||||
charset utf-8;
|
||||
|
||||
access_log off;
|
||||
|
||||
# Include TastyIgniter's nginx configuration
|
||||
include /var/www/html/.nginx.conf;
|
||||
}
|
||||
Reference in new issue
Block a user