mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2026-01-30 18:57:12 +01:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
260980f2a3 | ||
|
|
57724b7d93 | ||
|
|
39b6680f0b | ||
|
|
768df3c1dd | ||
|
|
7870b345ed | ||
|
|
3c6ed5cda1 | ||
|
|
2f43d4b45a |
30
debian/Dockerfile
vendored
30
debian/Dockerfile
vendored
@@ -1,27 +1,17 @@
|
|||||||
FROM composer:latest AS composer
|
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"' | \
|
||||||
cut -d '"' -f 4 | \
|
cut -d '"' -f 4 | \
|
||||||
xargs curl -sL | \
|
xargs curl -sL | \
|
||||||
tar -xz
|
tar -xz \
|
||||||
|
&& ln -s ./resources/views/react/index.blade.php ./public/index.html \
|
||||||
RUN ln -s ./resources/views/react/index.blade.php ./public/index.html
|
# Set permissions: directories 755, files 644
|
||||||
|
&& chmod -R a=r,u+w,a+X . \
|
||||||
# Set permissions: directories 755, files 644
|
# Symlink
|
||||||
RUN chmod -R a=r,u+w,a+X .
|
&& php artisan storage:link \
|
||||||
|
# Octane
|
||||||
# Install dependencies
|
&& php artisan octane:install --server=frankenphp
|
||||||
RUN composer install --no-dev --no-scripts --no-autoloader --ignore-platform-reqs
|
|
||||||
|
|
||||||
RUN composer require laravel/octane --ignore-platform-reqs
|
|
||||||
|
|
||||||
RUN composer dump-autoload --optimize
|
|
||||||
|
|
||||||
RUN php artisan storage:link
|
|
||||||
|
|
||||||
# Octane
|
|
||||||
RUN php artisan octane:install --server=frankenphp
|
|
||||||
|
|
||||||
# ==================
|
# ==================
|
||||||
# InvoiceNinja image
|
# InvoiceNinja image
|
||||||
@@ -95,7 +85,7 @@ ENTRYPOINT ["/usr/local/bin/init.sh"]
|
|||||||
CMD ["frankenphp", "php-cli", "artisan", "octane:frankenphp"]
|
CMD ["frankenphp", "php-cli", "artisan", "octane:frankenphp"]
|
||||||
|
|
||||||
# InvoiceNinja
|
# InvoiceNinja
|
||||||
COPY --from=composer --chown=${user}:${user} /app /app
|
COPY --from=prepare-app --chown=${user}:${user} /app /app
|
||||||
|
|
||||||
# Add initialization script
|
# Add initialization script
|
||||||
COPY --chmod=0755 scripts/init.sh /usr/local/bin/init.sh
|
COPY --chmod=0755 scripts/init.sh /usr/local/bin/init.sh
|
||||||
|
|||||||
15
debian/docker-compose.yml
vendored
15
debian/docker-compose.yml
vendored
@@ -12,6 +12,7 @@ x-app-volumes: &volumes
|
|||||||
- ./php/php.ini:/usr/local/etc/php/conf.d/zzz-php.ini:ro
|
- ./php/php.ini:/usr/local/etc/php/conf.d/zzz-php.ini:ro
|
||||||
- app_cache:/var/www/html/bootstrap/cache
|
- app_cache:/var/www/html/bootstrap/cache
|
||||||
- app_storage:/app/storage
|
- app_storage:/app/storage
|
||||||
|
- caddy_data:/data
|
||||||
|
|
||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
@@ -20,9 +21,12 @@ services:
|
|||||||
image: invoiceninja/invoiceninja-debian:${TAG:-latest}
|
image: invoiceninja/invoiceninja-debian:${TAG:-latest}
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
# php artisan help octane:frankenphp
|
# php artisan help octane:frankenphp
|
||||||
command: --log-level=info
|
command: --port=80 --workers=2 --log-level=info
|
||||||
|
# command: --host=example.com --port=443 --workers=2 --https --http-redirect --log-level=info
|
||||||
ports:
|
ports:
|
||||||
- "80:8000"
|
- "80:80" # HTTP
|
||||||
|
# - "443:443" # HTTPS
|
||||||
|
# - "443:443/udp" # HTTP/3, causes an error for pdf preview H3_GENERAL_PROTOCOL_ERROR
|
||||||
env_file:
|
env_file:
|
||||||
- ./.env
|
- ./.env
|
||||||
environment:
|
environment:
|
||||||
@@ -135,14 +139,9 @@ services:
|
|||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
app_cache:
|
app_cache:
|
||||||
driver: local
|
|
||||||
app_storage:
|
app_storage:
|
||||||
driver: local
|
caddy_data:
|
||||||
mysql_data:
|
mysql_data:
|
||||||
driver: local
|
|
||||||
redis_data:
|
redis_data:
|
||||||
driver: local
|
|
||||||
# mariadb:
|
# mariadb:
|
||||||
# driver: local
|
|
||||||
# valkey:
|
# valkey:
|
||||||
# driver: local
|
|
||||||
|
|||||||
10
debian/php/php.ini
vendored
10
debian/php/php.ini
vendored
@@ -1,15 +1,15 @@
|
|||||||
[core]
|
[core]
|
||||||
# https://www.php.net/manual/en/ini.core.php
|
; https://www.php.net/manual/en/ini.core.php
|
||||||
post_max_size = 10M
|
post_max_size=10M
|
||||||
upload_max_filesize = 10M
|
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.max_accelerated_files=4000
|
||||||
opcache.revalidate_freq=60
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user