make sure we're installing composer and npm dependencies
This commit is contained in:
@@ -44,11 +44,5 @@ RUN chown -R www-data:www-data . \
|
|||||||
# install composer
|
# install composer
|
||||||
COPY --from=composer:2.6.5 /usr/bin/composer /usr/local/bin/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
|
# Run everything else
|
||||||
CMD ["./docker/entrypoint.sh"]
|
CMD ["./docker/entrypoint.sh"]
|
||||||
|
|||||||
@@ -8,8 +8,12 @@ if [ ! -f /var/www/app/.env ]; then
|
|||||||
cp /var/www/app/.env.example /var/www/app/.env
|
cp /var/www/app/.env.example /var/www/app/.env
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Waiting a second for the database to become available..."
|
echo "Installing Composer dependencies..."
|
||||||
sleep 2
|
/usr/local/bin/composer install
|
||||||
|
|
||||||
|
echo "Install NPM dependencies and build frontend..."
|
||||||
|
/usr/bin/npm install
|
||||||
|
/usr/bin/npm run build
|
||||||
|
|
||||||
echo "Running migrations..."
|
echo "Running migrations..."
|
||||||
/usr/local/bin/php /var/www/app/artisan migrate
|
/usr/local/bin/php /var/www/app/artisan migrate
|
||||||
|
|||||||
Reference in New Issue
Block a user