render-examples / php-laravel-docker

Larvel 5.8 PHP Docker Deployment on Render
https://render.com
MIT License
79 stars 683 forks source link

Problem with CMD start.sh #38

Closed gustavosantaella closed 1 year ago

gustavosantaella commented 1 year ago
FROM richarvey/nginx-php-fpm:2.0.4

COPY . .

ENV SKIP_COMPOSER 1
ENV WEBROOT /var/www/html/public
ENV PHP_ERRORS_STDERR 1
ENV RUN_SCRIPTS 1
ENV REAL_IP_HEADER 1

ENV APP_ENV production
ENV APP_DEBUG false
ENV LOG_CHANNEL stderr

ENV COMPOSER_ALLOW_SUPERUSER 1

CMD ["chmod +rx /start.sh ","/start.sh"]

I have this content in my Dockerfil. But i have an error with CMD ["chmod +rx /start.sh ","/start.sh"] , The start.sh file not found.

In my project, the file if exsits. The content is:

#!/usr/bin/bash
echo "Running composer"
composer global require hirak/prestissimo
composer install --no-dev --working-dir=/var/www/html

echo "Caching config..."
php artisan config:cache

echo "Caching routes..."
php artisan route:cache

echo "Running app"
php artisan serve --host 0.0.0.0 --port 10000