mirror of
https://github.com/InvoiceShelf/InvoiceShelf.git
synced 2026-04-20 19:54:08 +00:00
Add development environment
This commit is contained in:
60
.dev/php/Dockerfile
Normal file
60
.dev/php/Dockerfile
Normal file
@@ -0,0 +1,60 @@
|
||||
FROM php:8.3-fpm-bookworm
|
||||
|
||||
ARG UID
|
||||
ARG GID
|
||||
|
||||
ENV UID=${UID}
|
||||
ENV GID=${GID}
|
||||
|
||||
USER root
|
||||
|
||||
# Create user/group
|
||||
RUN addgroup --gid ${GID} --system invoiceshelf && \
|
||||
adduser --gid ${GID} --system --disabled-password --shell /bin/sh -u ${UID} --home /home/invoiceshelf 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 dependencies
|
||||
RUN apt update && apt install -y \
|
||||
libpng-dev \
|
||||
zlib1g-dev \
|
||||
libxml2-dev \
|
||||
libzip-dev \
|
||||
libonig-dev \
|
||||
libpq-dev \
|
||||
sqlite3 \
|
||||
postgresql-client \
|
||||
mariadb-client \
|
||||
zip \
|
||||
curl \
|
||||
unzip \
|
||||
webp \
|
||||
&& docker-php-ext-configure gd \
|
||||
&& docker-php-ext-install -j$(nproc) gd \
|
||||
&& docker-php-ext-install bcmath \
|
||||
&& docker-php-ext-install mbstring \
|
||||
&& docker-php-ext-install mysqli \
|
||||
&& docker-php-ext-install pdo_mysql \
|
||||
&& docker-php-ext-configure pgsql -with-pgsql=/usr/local/pgsql \
|
||||
&& docker-php-ext-install pgsql \
|
||||
&& docker-php-ext-install pdo_pgsql \
|
||||
&& docker-php-ext-install zip \
|
||||
&& docker-php-ext-install xml \
|
||||
&& docker-php-source delete
|
||||
|
||||
# Clear cache
|
||||
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set workdir
|
||||
WORKDIR /home/invoiceshelf/app
|
||||
|
||||
# Copy Files
|
||||
COPY /php/entrypoint.sh /
|
||||
|
||||
# Entrypoint
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
CMD ["php-fpm"]
|
||||
12
.dev/php/entrypoint.sh
Executable file
12
.dev/php/entrypoint.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "############################################"
|
||||
echo "### InvoiceShelf Development Environment ###"
|
||||
echo "############################################"
|
||||
|
||||
chown -R ${UID}:${GID} /home/invoiceshelf/app
|
||||
chmod +x /home/invoiceshelf/app/artisan
|
||||
|
||||
cd /home/invoiceshelf/app && php artisan storage:link
|
||||
|
||||
exec $@
|
||||
1974
.dev/php/php.ini
Normal file
1974
.dev/php/php.ini
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user