feat: entry point
This commit is contained in:
+5
-5
@@ -30,14 +30,14 @@ COPY . .
|
|||||||
RUN composer dump-autoload --optimize
|
RUN composer dump-autoload --optimize
|
||||||
|
|
||||||
|
|
||||||
RUN php artisan config:cache
|
|
||||||
RUN php artisan route:cache
|
|
||||||
RUN php artisan view:cache
|
|
||||||
|
|
||||||
|
|
||||||
RUN chown -R www-data:www-data storage bootstrap/cache
|
RUN chown -R www-data:www-data storage bootstrap/cache
|
||||||
|
|
||||||
|
|
||||||
|
COPY docker/entrypoint.sh /entrypoint.sh
|
||||||
|
RUN chmod +x /entrypoint.sh
|
||||||
|
|
||||||
|
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
|
|
||||||
CMD ["frankenphp", "php-server", "--listen", "0.0.0.0:8000"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ services:
|
|||||||
- database
|
- database
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- storage:/var/www/html/storage
|
- storage:/app/storage
|
||||||
|
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "🔧 Caching config, routes and views..."
|
||||||
|
php artisan config:cache
|
||||||
|
php artisan route:cache
|
||||||
|
php artisan view:cache
|
||||||
|
|
||||||
|
echo "🗄️ Running migrations..."
|
||||||
|
php artisan migrate --force
|
||||||
|
|
||||||
|
echo "🚀 Starting FrankenPHP..."
|
||||||
|
exec frankenphp php-server --listen 0.0.0.0:8000
|
||||||
Reference in New Issue
Block a user