mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2026-01-30 02:37:09 +01:00
Compare commits
19 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec35498159 | ||
|
|
4bff59808e | ||
|
|
217c05bd1f | ||
|
|
24d1f9cd2e | ||
|
|
9a3603b709 | ||
|
|
c2bf3ca8d9 | ||
|
|
1c3f96e723 | ||
|
|
2364f53777 | ||
|
|
7bfbe9ee03 | ||
|
|
afd597456f | ||
|
|
243f46bd23 | ||
|
|
6dfaa3b441 | ||
|
|
6d0e0648e3 | ||
|
|
85979fdcf2 | ||
|
|
377c068667 | ||
|
|
da7f8d93b0 | ||
|
|
1d475a5218 | ||
|
|
3a8184df73 | ||
|
|
0c796fee5f |
4
.github/workflows/build-image-debian.yaml
vendored
4
.github/workflows/build-image-debian.yaml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: Build Debian OctaneContainer Image
|
name: Build Debian Octane Container Image
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
@@ -12,7 +12,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
docker:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|||||||
6
.github/workflows/publish-image.yaml
vendored
6
.github/workflows/publish-image.yaml
vendored
@@ -7,16 +7,16 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker:
|
docker:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-22.04
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- image: invoiceninja/invoiceninja-octane
|
- image: invoiceninja/invoiceninja-octane
|
||||||
context: ./debian
|
context: debian
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4 # Updated from v2
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
|
|||||||
2
debian/.env
vendored
2
debian/.env
vendored
@@ -57,6 +57,6 @@ NORDIGEN_SECRET_KEY=
|
|||||||
|
|
||||||
IS_DOCKER=true
|
IS_DOCKER=true
|
||||||
SCOUT_DRIVER=null
|
SCOUT_DRIVER=null
|
||||||
SNAPPDF_CHROMIUM_PATH=/usr/bin/google-chrome-stable
|
#SNAPPDF_CHROMIUM_PATH=/usr/bin/google-chrome-stable
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
15
debian/Dockerfile
vendored
15
debian/Dockerfile
vendored
@@ -1,9 +1,6 @@
|
|||||||
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 -sL "https://github.com/invoiceninja/invoiceninja/releases/latest/download/invoiceninja.tar.gz" | \
|
||||||
grep -o '"browser_download_url": "[^"]*invoiceninja.tar"' | \
|
|
||||||
cut -d '"' -f 4 | \
|
|
||||||
xargs curl -sL | \
|
|
||||||
tar -xz \
|
tar -xz \
|
||||||
&& ln -s ./resources/views/react/index.blade.php ./public/index.html \
|
&& ln -s ./resources/views/react/index.blade.php ./public/index.html \
|
||||||
# Symlink
|
# Symlink
|
||||||
@@ -19,7 +16,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 mbstring pdo_mysql zip"
|
||||||
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"
|
||||||
|
|
||||||
@@ -80,10 +77,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 +84,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
|
||||||
|
|||||||
9
debian/scripts/init.sh
vendored
9
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
|
||||||
@@ -82,4 +82,11 @@ if [ "$*" = 'frankenphp php-cli artisan octane:frankenphp' ] || [ "${1#-}" != "$
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Set PDF generation browser path based on architecture
|
||||||
|
if [ "$(dpkg --print-architecture)" = "amd64" ]; then
|
||||||
|
export SNAPPDF_CHROMIUM_PATH=/usr/bin/google-chrome-stable
|
||||||
|
elif [ "$(dpkg --print-architecture)" = "arm64" ]; then
|
||||||
|
export SNAPPDF_CHROMIUM_PATH=/usr/bin/chromium
|
||||||
|
fi
|
||||||
|
|
||||||
exec "$@"
|
exec "$@"
|
||||||
|
|||||||
Reference in New Issue
Block a user