make sure we're installing composer and npm dependencies

This commit is contained in:
hackerESQ
2024-09-04 18:00:34 -05:00
parent 9b7dfb2baf
commit 82c5c23278
2 changed files with 6 additions and 8 deletions
-6
View File
@@ -44,11 +44,5 @@ RUN chown -R www-data:www-data . \
# install composer
COPY --from=composer:2.6.5 /usr/bin/composer /usr/local/bin/composer
# copy composer.json to workdir & install dependencies
RUN composer install
# Run NPM build
RUN npm install && npm run build
# Run everything else
CMD ["./docker/entrypoint.sh"]
+6 -2
View File
@@ -8,8 +8,12 @@ if [ ! -f /var/www/app/.env ]; then
cp /var/www/app/.env.example /var/www/app/.env
fi
echo "Waiting a second for the database to become available..."
sleep 2
echo "Installing Composer dependencies..."
/usr/local/bin/composer install
echo "Install NPM dependencies and build frontend..."
/usr/bin/npm install
/usr/bin/npm run build
echo "Running migrations..."
/usr/local/bin/php /var/www/app/artisan migrate