Fix Docker container startup and API endpoint configuration
- Update Dockerfile to use inline CMD instead of external start.sh script to resolve execution issues with CRLF line endings - Fix nginx fastcgi_pass configuration to use localhost:9000 for PHP-FPM communication - Correct API endpoint paths in frontend from /src/api.php to /api.php to match nginx document root configuration - Ensure Composer dependencies are properly installed with PHP 8.3 compatibility 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -38,8 +38,5 @@ RUN chown -R www-data:www-data /var/www/html \
|
||||
# Expose port 80
|
||||
EXPOSE 80
|
||||
|
||||
# Start script
|
||||
COPY start.sh /start.sh
|
||||
RUN chmod +x /start.sh
|
||||
|
||||
CMD ["/start.sh"]
|
||||
# Start PHP-FPM and Nginx
|
||||
CMD php-fpm -D && nginx -g 'daemon off;'
|
||||
|
||||
@@ -14,7 +14,7 @@ server {
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_pass localhost:9000;
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
|
||||
Reference in New Issue
Block a user