diff --git a/.dockerignore b/.dockerignore index 21cc565..a4a20eb 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,3 +2,6 @@ vendor/ .git/ storage/app/private/images +node_modules +public/hot +public/build diff --git a/dockerfile b/dockerfile index 46adb24..5f947f2 100644 --- a/dockerfile +++ b/dockerfile @@ -1,10 +1,7 @@ FROM php:8.4-fpm-alpine -LABEL org.opencontainers.image.version="1.0.3" -LABEL org.opencontainers.image.title="FlightsAPI" - # Install dependencies -RUN apk add --no-cache nginx curl zip unzip git postgresql-dev \ +RUN apk add --no-cache nginx curl zip unzip git postgresql-dev nodejs npm \ && docker-php-ext-install pdo pdo_pgsql pgsql opcache # Install Composer @@ -16,6 +13,8 @@ COPY . . RUN composer install --no-dev --optimize-autoloader +RUN npm install && npm run build && rm -f public/hot + COPY docker/nginx.conf /etc/nginx/nginx.conf RUN chown -R www-data:www-data /var/www/storage /var/www/bootstrap/cache diff --git a/routes/web.php b/routes/web.php index 542e366..c780a87 100644 --- a/routes/web.php +++ b/routes/web.php @@ -37,7 +37,6 @@ Route::domain(config('app.api_domain'))->group(function () { Route::get('/', function () { return response()->json(['message' => 'Welcome to the FlightsGoneBy API']); }); - Route::get('airlines/logos/{code}', [LogoController::class, 'getLogoByCode']); Route::get('airlines/logos/tail/{code}', [LogoController::class, 'getLogoByCode']) ->where('code', '[A-Za-z0-9]{2,3}'); });