mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2026-01-31 03:07:09 +01:00
Compare commits
7 Commits
5.11.24-o
...
5.11.28a-o
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6d0e0648e3 | ||
|
|
85979fdcf2 | ||
|
|
377c068667 | ||
|
|
da7f8d93b0 | ||
|
|
1d475a5218 | ||
|
|
3a8184df73 | ||
|
|
0c796fee5f |
17
debian/Dockerfile
vendored
17
debian/Dockerfile
vendored
@@ -1,10 +1,10 @@
|
|||||||
FROM dunglas/frankenphp:1-php8.3-bookworm AS prepare-app
|
FROM dunglas/frankenphp:1-php8.3-bookworm AS prepare-app
|
||||||
|
|
||||||
RUN curl -s "https://api.github.com/repos/invoiceninja/invoiceninja/releases/latest" | \
|
RUN curl -s "https://api.github.com/repos/invoiceninja/invoiceninja/releases/latest" | \
|
||||||
grep -o '"browser_download_url": "[^"]*invoiceninja.tar"' | \
|
grep -o '"browser_download_url": "[^"]*invoiceninja.tar.gz"' | \
|
||||||
cut -d '"' -f 4 | \
|
cut -d '"' -f 4 | \
|
||||||
xargs curl -sL | \
|
xargs curl -sL | \
|
||||||
tar -xz \
|
tar -xz --strip-components=1 \
|
||||||
&& ln -s ./resources/views/react/index.blade.php ./public/index.html \
|
&& ln -s ./resources/views/react/index.blade.php ./public/index.html \
|
||||||
# Symlink
|
# Symlink
|
||||||
&& php artisan storage:link \
|
&& php artisan storage:link \
|
||||||
@@ -19,7 +19,7 @@ FROM dunglas/frankenphp:1-php8.3-bookworm
|
|||||||
ARG user=ninja
|
ARG user=ninja
|
||||||
|
|
||||||
# PHP modules
|
# PHP modules
|
||||||
ARG php_require="bcmath gd pdo_mysql zip"
|
ARG php_require="bcmath gd pdo_mysql zip mbstring"
|
||||||
ARG php_suggest="exif imagick intl pcntl soap saxon-12.5.0"
|
ARG php_suggest="exif imagick intl pcntl soap saxon-12.5.0"
|
||||||
ARG php_extra="opcache"
|
ARG php_extra="opcache"
|
||||||
|
|
||||||
@@ -61,11 +61,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Install PHP extensions
|
# Install PHP extensions
|
||||||
|
COPY --from=ghcr.io/mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
|
||||||
|
|
||||||
RUN install-php-extensions \
|
RUN install-php-extensions \
|
||||||
${php_require} \
|
${php_require} \
|
||||||
${php_suggest} \
|
${php_suggest} \
|
||||||
${php_extra}
|
${php_extra}
|
||||||
|
|
||||||
|
|
||||||
# Configure PHP
|
# Configure PHP
|
||||||
RUN ln -s "${PHP_INI_DIR}/php.ini-production" "${PHP_INI_DIR}/php.ini"
|
RUN ln -s "${PHP_INI_DIR}/php.ini-production" "${PHP_INI_DIR}/php.ini"
|
||||||
|
|
||||||
@@ -80,10 +83,6 @@ RUN chown -R ${user}: \
|
|||||||
/data/caddy \
|
/data/caddy \
|
||||||
/config/caddy
|
/config/caddy
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/local/bin/init.sh"]
|
|
||||||
|
|
||||||
CMD ["frankenphp", "php-cli", "artisan", "octane:frankenphp"]
|
|
||||||
|
|
||||||
# InvoiceNinja
|
# InvoiceNinja
|
||||||
COPY --from=prepare-app --chown=${user}:${user} /app /app
|
COPY --from=prepare-app --chown=${user}:${user} /app /app
|
||||||
|
|
||||||
@@ -91,3 +90,7 @@ COPY --from=prepare-app --chown=${user}:${user} /app /app
|
|||||||
COPY --chmod=0755 scripts/init.sh /usr/local/bin/init.sh
|
COPY --chmod=0755 scripts/init.sh /usr/local/bin/init.sh
|
||||||
|
|
||||||
USER ${user}
|
USER ${user}
|
||||||
|
|
||||||
|
ENTRYPOINT ["/usr/local/bin/init.sh"]
|
||||||
|
|
||||||
|
CMD ["frankenphp", "php-cli", "artisan", "octane:frankenphp"]
|
||||||
|
|||||||
12
debian/php/php.ini
vendored
12
debian/php/php.ini
vendored
@@ -6,10 +6,18 @@ upload_max_filesize=10M
|
|||||||
[opcache]
|
[opcache]
|
||||||
; https://www.php.net/manual/en/opcache.installation.php#opcache.installation.recommended
|
; https://www.php.net/manual/en/opcache.installation.php#opcache.installation.recommended
|
||||||
opcache.enable_cli=1
|
opcache.enable_cli=1
|
||||||
opcache.max_accelerated_files=4000
|
|
||||||
opcache.revalidate_freq=60
|
|
||||||
|
|
||||||
[jit]
|
[jit]
|
||||||
; https://wiki.php.net/rfc/jit_config_defaults
|
; https://wiki.php.net/rfc/jit_config_defaults
|
||||||
opcache.jit=tracing
|
opcache.jit=tracing
|
||||||
opcache.jit_buffer_size=64M
|
opcache.jit_buffer_size=64M
|
||||||
|
|
||||||
|
[extra]
|
||||||
|
; https://frankenphp.dev/docs/performance/#php-performance
|
||||||
|
; http://symfony.com/doc/current/performance.html
|
||||||
|
opcache.memory_consumption=256
|
||||||
|
opcache.max_accelerated_files=20000
|
||||||
|
opcache.preload=/app/preload.php
|
||||||
|
opcache.validate_timestamps=0
|
||||||
|
realpath_cache_size = 4096K
|
||||||
|
realpath_cache_ttl = 600
|
||||||
|
|||||||
2
debian/scripts/init.sh
vendored
2
debian/scripts/init.sh
vendored
@@ -48,7 +48,7 @@ if [ "$*" = 'frankenphp php-cli artisan octane:frankenphp' ] || [ "${1#-}" != "$
|
|||||||
frankenphp php-cli artisan migrate --force
|
frankenphp php-cli artisan migrate --force
|
||||||
|
|
||||||
# If first IN run, it needs to be initialized
|
# If first IN run, it needs to be initialized
|
||||||
if [ "$(frankenphp php-cli artisan tinker --execute='echo Schema::hasTable("accounts") && !App\Models\Account::all()->first();')" = "1" ]; then
|
if [ "$(php -d opcache.preload='' artisan tinker --execute='echo Schema::hasTable("accounts") && !App\Models\Account::all()->first();')" = "1" ]; then
|
||||||
echo "Running initialization..."
|
echo "Running initialization..."
|
||||||
|
|
||||||
frankenphp php-cli artisan db:seed --force
|
frankenphp php-cli artisan db:seed --force
|
||||||
|
|||||||
Reference in New Issue
Block a user