mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-12 15:57:22 +00:00
Add node and exif & update entrypoint
This commit is contained in:
@@ -14,8 +14,10 @@ RUN addgroup --gid ${GID} --system invoiceshelf && \
|
||||
sed -i "s/user = www-data/user = invoiceshelf/g" /usr/local/etc/php-fpm.d/www.conf && \
|
||||
sed -i "s/group = www-data/group = invoiceshelf/g" /usr/local/etc/php-fpm.d/www.conf
|
||||
|
||||
# Install Composer
|
||||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||
# Install composer & npm
|
||||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
|
||||
curl -sL https://deb.nodesource.com/setup_20.x | bash - && \
|
||||
apt install -y nodejs
|
||||
|
||||
# install dependencies
|
||||
RUN apt update && apt install -y \
|
||||
@@ -43,6 +45,7 @@ RUN apt update && apt install -y \
|
||||
&& docker-php-ext-install pdo_pgsql \
|
||||
&& docker-php-ext-install zip \
|
||||
&& docker-php-ext-install xml \
|
||||
&& docker-php-ext-install exif \
|
||||
&& docker-php-source delete
|
||||
|
||||
# Clear cache
|
||||
@@ -55,6 +58,9 @@ WORKDIR /home/invoiceshelf/app
|
||||
COPY /php/entrypoint.sh /
|
||||
|
||||
# Entrypoint
|
||||
USER invoiceshelf
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
# Launch php-fpm
|
||||
USER root
|
||||
CMD ["php-fpm"]
|
||||
|
||||
@@ -4,9 +4,30 @@ echo "############################################"
|
||||
echo "### InvoiceShelf Development Environment ###"
|
||||
echo "############################################"
|
||||
|
||||
chown -R ${UID}:${GID} /home/invoiceshelf/app
|
||||
chmod +x /home/invoiceshelf/app/artisan
|
||||
cd /home/invoiceshelf/app
|
||||
|
||||
cd /home/invoiceshelf/app && php artisan storage:link
|
||||
chmod 775 storage/framework
|
||||
chmod 775 storage/logs
|
||||
chmod 775 bootstrap/cache
|
||||
|
||||
chown -R ${UID}:${GID} /home/invoiceshelf/app
|
||||
|
||||
chmod +x artisan
|
||||
|
||||
if [ ! -d vendor ]; then
|
||||
composer install
|
||||
fi
|
||||
|
||||
if [ ! -f .env ]; then
|
||||
cp .env.example .env
|
||||
php artisan key:generate --force
|
||||
fi
|
||||
|
||||
if [ ! -d node_modules ]; then
|
||||
npm install
|
||||
npm run build
|
||||
fi
|
||||
|
||||
php artisan storage:link
|
||||
|
||||
exec $@
|
||||
|
||||
Reference in New Issue
Block a user