Compare commits

..

148 Commits

Author SHA1 Message Date
David Bomba
ff3b7263f5 Merge pull request #825 from turbo124/master
Force cache:clear on first boot
2025-10-28 06:28:11 +11:00
David Bomba
ba896fcc03 Force cache:clear on first boot 2025-10-28 06:26:49 +11:00
David Bomba
b53ed7c914 Merge pull request #749 from turbo124/master
Add deprecation notice for master branch
2025-04-25 08:23:55 +10:00
David Bomba
e3fd4afb7d Add deprecation notice for master branch 2025-04-25 08:23:28 +10:00
David Bomba
afceccfaf6 Merge pull request #734 from benbrummer/master
github latest url, tar.gz, alpine 3.20
2025-03-19 10:05:22 +11:00
Benjamin Brummer
320cdc961d github latest url, tar.gz, alpine 3.20 2025-03-18 07:25:21 +00:00
David Bomba
7e466b38a3 Merge pull request #715 from invoiceninja/revert-689-master
Revert "Align alpine to debian and octane for maintenance"
2025-01-26 09:47:59 +11:00
David Bomba
c5bb7960c3 Revert "Align alpine to debian and octane for maintenance" 2025-01-26 09:47:24 +11:00
David Bomba
3bf4174cbf Merge pull request #712 from turbo124/master
Fixes for publish-image regression
2025-01-24 15:40:41 +11:00
David Bomba
18550bcf3e Fixes for publish-image regression 2025-01-24 15:40:26 +11:00
David Bomba
83bfb1b22f Fixes for publish-image regression 2025-01-24 15:38:25 +11:00
David Bomba
e4b3e0f0f1 Merge pull request #711 from turbo124/master
Revert and run on ubuntu 22.04
2025-01-24 15:01:20 +11:00
David Bomba
a060c70d3f Revert and run on ubuntu 22.04 2025-01-24 15:01:08 +11:00
David Bomba
d8749fa049 Revert and run on ubuntu 22.04 2025-01-24 14:59:52 +11:00
David Bomba
febb70263c Merge pull request #710 from turbo124/master
align build and publish images
2025-01-24 14:49:21 +11:00
David Bomba
4b6b287906 align build and publish images 2025-01-24 14:48:52 +11:00
David Bomba
e0bb394346 minor changes 2025-01-24 14:32:47 +11:00
David Bomba
914bebebf6 Merge pull request #705 from turbo124/master
Working on php extension installer issue
2025-01-24 12:20:23 +11:00
David Bomba
e617f2d808 Working on php extension installer issue 2025-01-24 12:19:56 +11:00
David Bomba
3a4f138f6a Merge pull request #704 from turbo124/master
Fixes for yaml syntax
2025-01-24 11:51:00 +11:00
David Bomba
ce9ce4fd26 Fixes for yaml syntax 2025-01-24 11:50:35 +11:00
David Bomba
d01706a734 Merge pull request #703 from turbo124/master
Change the way we invoke install php extensions
2025-01-24 11:49:34 +11:00
David Bomba
00e54c9c23 Change the way we invoke install php extensions 2025-01-24 11:41:37 +11:00
David Bomba
4ea7218cd8 Merge pull request #702 from turbo124/master
Reduce parallel jobs and add swap in case we are hitting github actions
2025-01-24 10:10:16 +11:00
David Bomba
e161a85133 Reduce parallel jobs and add swap in case we are hitting github action limitations 2025-01-24 10:09:25 +11:00
David Bomba
d27c1a22d8 Merge pull request #701 from turbo124/master
Require mbstring
2025-01-24 09:24:18 +11:00
David Bomba
83dbf94c2b require mbstring 2025-01-24 09:22:01 +11:00
David Bomba
c0ee1a5521 Merge pull request #689 from benbrummer/master
Align alpine to debian and octane for maintenance
2025-01-24 09:16:34 +11:00
Benjamin Brummer
018e0e7b2a readded mariadb-connector-c 2025-01-15 11:29:46 +00:00
Benjamin Brummer
07a211bc13 pidfile is not required 2025-01-15 11:16:45 +00:00
Benjamin Brummer
4c9ae7e92f Align supervisor with debian 2025-01-15 11:09:04 +00:00
Benjamin Brummer
fe1ff5c496 remove hosts 2025-01-15 09:53:08 +00:00
Benjamin Brummer
3a0d184fb2 remove network 2025-01-15 09:52:00 +00:00
Benjamin Brummer
42c62adf1a php optimization 2025-01-15 09:49:58 +00:00
Benjamin Brummer
7a72c2ef16 set alpine to 3.20 2025-01-15 09:29:59 +00:00
Benjamin Brummer
974df2fa20 align supervisord to laravel docs/debian 2025-01-14 20:27:22 +00:00
Benjamin Brummer
7629f51492 cleanup php.ini 2025-01-14 20:25:50 +00:00
Benjamin Brummer
977e2001f0 disable preload for artisan tinker 2025-01-13 12:19:01 +00:00
Benjamin Brummer
a520f32385 cleanup 2025-01-13 12:16:43 +00:00
Benjamin Brummer
9b63fc3fbc php-fpm.conf, renamed server to nginx 2025-01-12 14:03:31 +00:00
Benjamin Brummer
cbaf961012 update php.ini, fix for valkey configuration 2025-01-12 12:27:20 +00:00
Benjamin Brummer
797aa6bdf8 redis/valkey cache 2025-01-12 11:43:08 +00:00
Benjamin Brummer
103b912467 align nginx with debian 2025-01-12 11:12:38 +00:00
Benjamin Brummer
7a171b96c7 align with debian, php 8.3 2025-01-12 10:46:52 +00:00
David Bomba
c69093a265 Merge pull request #674 from turbo124/master
Updates for github actions
2024-12-11 09:56:08 +11:00
David Bomba
8863ed9e38 Updates for github actions 2024-12-11 09:54:48 +11:00
David Bomba
76b5e10318 Update README.md 2024-11-23 14:18:12 +11:00
David Bomba
9941847af7 Merge pull request #608 from turbo124/master
Add intl extension
2024-07-08 09:44:43 +10:00
David Bomba
edf21b5d4f Add intl extension 2024-07-08 09:21:29 +10:00
David Bomba
7acd479cfd Merge pull request #593 from turbo124/master
Changes for release filename
2024-06-24 09:06:16 +10:00
David Bomba
bed751ce18 Changes for release filename 2024-06-24 09:05:48 +10:00
David Bomba
303bc81d3d Merge pull request #517 from Leopere/patch-1
Please don't bind mysql to all interfaces with default credentials in Docker-compose
2024-06-23 13:59:00 +10:00
David Bomba
47e5c41a19 Merge pull request #587 from Daniel15/patch-1
php.ini: Update opcache.preload example to use correct path
2024-06-12 16:43:49 +10:00
Daniel Lo Nigro
89a994b12f php.ini: Update opcache.preload to use correct path
Signed-off-by: Daniel Lo Nigro <d@d.sb>
2024-06-11 23:05:20 -07:00
David Bomba
5984339118 Merge pull request #586 from turbo124/master
Fixes for resource path download
2024-06-09 13:32:22 +10:00
David Bomba
47dba02b27 Fixes for build 2024-06-09 13:31:38 +10:00
David Bomba
1aca36878c Fixes for download url 2024-06-09 12:42:49 +10:00
David Bomba
cf324703a8 Merge pull request #585 from turbo124/master
Fixes for build
2024-06-09 12:32:11 +10:00
David Bomba
df2ea66cda Fixes for build 2024-06-09 12:31:47 +10:00
David Bomba
02eed022ac Merge pull request #584 from turbo124/master
Fixes for build
2024-06-09 12:30:28 +10:00
David Bomba
738546d7b1 Add back fonts 2024-06-09 12:30:02 +10:00
David Bomba
e31a2b77bc Fies for downloading package 2024-06-09 12:29:25 +10:00
David Bomba
50debff2da Fixes for build 2024-06-09 11:57:23 +10:00
David Bomba
492d895d06 Merge pull request #583 from turbo124/master
Fixes for build
2024-06-09 11:38:28 +10:00
David Bomba
51294f6b76 Fixes for build 2024-06-09 11:38:04 +10:00
David Bomba
81617a3dec Updates for build 2024-06-07 21:10:51 +10:00
David Bomba
a874ceb7c2 Merge pull request #581 from chaseSpace/master
build: add Chinese font pkg support
2024-06-06 13:06:47 +10:00
Leigg
4a3d8783d4 build: add Chinese font pkg support
Signed-off-by: Leigg <34116031+chaseSpace@users.noreply.github.com>
2024-06-06 09:44:17 +08:00
David Bomba
84a6637f80 Merge pull request #575 from julianengel/patch-1
Added GoCardless/Nordigen key to env file
2024-05-02 08:35:54 +10:00
Julian Engel
821f3f5ec7 Added GoCardless/Nordigen key to env file
Signed-off-by: Julian Engel <julianengel@users.noreply.github.com>
2024-05-01 15:47:35 +02:00
David Bomba
dafd4051d3 Merge pull request #572 from turbo124/master
Updates for react release
2024-04-05 08:45:27 +11:00
David Bomba
c6b44487f3 Updates for react release 2024-04-05 08:45:03 +11:00
David Bomba
b2e03ce544 Merge pull request #570 from turbo124/master
Rollback copy
2024-04-05 07:29:10 +11:00
David Bomba
78fd70118a Rollback copy 2024-04-05 07:28:47 +11:00
David Bomba
59616eada8 Merge pull request #569 from turbo124/master
Set react as default interface
2024-04-04 22:02:58 +11:00
David Bomba
0fab60378a Improvements for build 2024-04-04 22:02:17 +11:00
David Bomba
47db01612d Improvements for build 2024-04-04 22:01:41 +11:00
David Bomba
1a1cea632b Merge pull request #568 from turbo124/master
Refactor build steps
2024-04-04 20:05:01 +11:00
David Bomba
5609b988f3 Refactor build steps 2024-04-04 20:04:13 +11:00
David Bomba
0f9d39998f Merge pull request #561 from anojht/patch-1
Fix Docker builds for circular dependency in project
2024-01-21 21:27:02 +11:00
Anojh Thayaparan
fd01abb0a0 set workdir to fix npm install step 2024-01-20 23:55:07 -08:00
Anojh Thayaparan
6887e2b30a Revert old approach 2024-01-20 21:09:28 -08:00
Anojh Thayaparan
6faf1dc135 Rename final build stage to prod for CI/CD pipeline setup 2024-01-20 21:00:49 -08:00
Anojh Thayaparan
d7cd59c80f Fix Docker builds for circular dependency in project
Due to the circular dependency of livewire JS module from composer, without intermediate build stages the Docker build fails during the vite build stage due to missing module.

The changes here allow composer install to run then copies the vendor folder to an intermediate stage in order to complete the vite build with the livewire dependency being present.

Then the contents are copied back in another intermediate stage to the php environment to complete the build.

Signed-off-by: Anojh Thayaparan <anojh@hotmail.com>
2024-01-20 20:55:41 -08:00
David Bomba
8206377870 Merge pull request #560 from turbo124/master
Updates for broken build pipeline
2024-01-21 12:53:02 +11:00
David Bomba
93214291c9 v5.8.13 2024-01-21 12:52:08 +11:00
David Bomba
f3477e6e80 Updates for DockerFile 2024-01-18 20:27:00 +11:00
David Bomba
d766e8284c Merge pull request #559 from turbo124/master
Bump for Node version
2024-01-18 19:45:27 +11:00
David Bomba
08e24b4b01 Bump for Node version 2024-01-18 19:44:44 +11:00
David Bomba
43cc7417ba Merge pull request #541 from turbo124/master
Fixes for vite build
2023-09-30 10:34:18 +10:00
David Bomba
150abf1d6e Fixes for vite build 2023-09-30 10:33:38 +10:00
David Bomba
31b3d309b3 Merge pull request #540 from turbo124/master
Updates for react build
2023-09-21 13:36:49 +10:00
David Bomba
cb74a1f93b Updates for react build 2023-09-21 13:32:22 +10:00
David Bomba
f566ec5715 Merge pull request #539 from turbo124/master
Create react version dir
2023-09-21 08:51:23 +10:00
David Bomba
91cc86af6d Create react version dir 2023-09-21 08:51:04 +10:00
David Bomba
7bac478538 Merge pull request #538 from turbo124/master
Refactor for react builds
2023-09-21 08:47:39 +10:00
David Bomba
f93fa6b874 refactor for react builds 2023-09-21 08:46:25 +10:00
David Bomba
d9a40ebb43 Merge pull request #537 from turbo124/master
Updates for react build
2023-09-21 07:30:17 +10:00
David Bomba
db5d0ebf50 Updates for react build 2023-09-21 07:29:42 +10:00
David Bomba
926b3d618b Merge pull request #536 from turbo124/master
Improve react support in dockerfile
2023-09-20 22:15:28 +10:00
David Bomba
85d256a435 Improve react support in dockerfile 2023-09-20 22:14:49 +10:00
David Bomba
acf9c22ff7 looping in react folder 2023-09-20 18:16:37 +10:00
David Bomba
b0ebac9719 improve react builds for Docker 2023-09-20 17:42:31 +10:00
David Bomba
65c5ceb69b Merge pull request #535 from turbo124/master
Fixes for stale react files
2023-09-18 16:03:33 +10:00
David Bomba
6aa39b4b57 Fixes for stale react files 2023-09-18 16:02:54 +10:00
David Bomba
c4ac430d1b Merge pull request #532 from turbo124/master
Disable access to php scripts in /storage
2023-09-06 00:10:50 +10:00
David Bomba
87066953d3 Disable access to php scripts in /storage 2023-09-06 00:05:54 +10:00
Ffaen
3969a37852 Bump chart version to 5.6.24 (#527) 2023-08-29 22:07:23 +08:00
David Bomba
bec60de1e7 Merge pull request #524 from turbo124/master
Updates for docker files to use PHP 8.2
2023-07-09 16:21:07 +10:00
David Bomba
c0150debbf Updates for docker files to use PHP 8.2 2023-07-09 16:20:45 +10:00
David Bomba
f45261617f Merge pull request #521 from turbo124/master
Fixes for React builds
2023-07-07 17:59:18 +10:00
David Bomba
21b6cf1f26 Fixes for React builds 2023-07-07 17:58:46 +10:00
David Bomba
d3a4948641 Merge pull request #519 from turbo124/master
Adds options to use config bases php.ini
2023-07-07 16:43:28 +10:00
David Bomba
a9a6b72c7a Position composer dump correctly 2023-07-07 16:43:06 +10:00
David Bomba
4fd6ca33c8 Do no use scripts in composer i 2023-07-07 16:29:57 +10:00
David Bomba
bca8404f5f work around for failing image build 2023-07-06 23:54:13 +10:00
David Bomba
3cf7c28875 Update cache buster 2023-07-06 22:03:26 +10:00
David Bomba
96dee55e7f Revert back to stable 2023-07-06 17:22:27 +10:00
David Bomba
ae592a8407 Revert back to stable 2023-07-06 17:19:27 +10:00
David Bomba
b72757ead0 Fixes for composer 2023-07-06 17:09:50 +10:00
David Bomba
a20fc14683 Add debug to package discovery 2023-07-06 16:00:48 +10:00
David Bomba
0e2934d1e3 Fixes for package discovery 2023-07-06 15:44:39 +10:00
David Bomba
fefc51ccf1 Fixes for package discovery 2023-07-06 14:51:50 +10:00
David Bomba
acdd6851ff fixes for build 2023-07-06 14:05:41 +10:00
David Bomba
6ff8e04aa7 Update cache buster 2023-07-06 13:53:01 +10:00
David Bomba
86f1dd43cf debugging composer 2023-07-06 13:24:16 +10:00
David Bomba
cc1f569324 fixes for composer 2023-07-06 12:49:41 +10:00
David Bomba
c78f7a7bdf fixes for composer 2023-07-06 12:47:13 +10:00
David Bomba
7198222787 debug composer failures 2023-07-06 12:36:12 +10:00
David Bomba
4ef4531a4e Ensure composer is present 2023-07-06 12:17:56 +10:00
David Bomba
c51d113abe Fixes for builds 2023-07-06 11:11:47 +10:00
David Bomba
dddd558873 Fixes for custom php.ini 2023-07-06 11:00:37 +10:00
David Bomba
5727550983 Add options for using config bases php.ini 2023-07-06 10:49:28 +10:00
David Bomba
03536efb6a Add options for using config bases php.ini 2023-07-06 10:48:50 +10:00
Leopere
6a05bdbbd5 Update docker-compose.yml
Please don't do this. Default credentials on the sql container in the .env file and then bind blindly 3305 on all interfaces for the public  to log in with ninja//ninja
2023-06-23 11:06:27 -04:00
David Bomba
e5debf03d4 Merge pull request #509 from invoiceninja/revert-506-feat/init-traefik-config
Revert "add traefik config example"
2023-04-29 09:02:03 +10:00
David Bomba
33a55e362b Revert "add traefik config example" 2023-04-29 09:01:55 +10:00
David Bomba
70e1de9a95 Merge pull request #506 from Access-InTech/feat/init-traefik-config
add traefik config example
2023-04-29 08:31:38 +10:00
Xenion1987
e1b113bba1 add http-01 example 2023-04-28 19:29:31 +02:00
Xenion1987
c967aaccf4 add traefik config example 2023-04-25 12:39:11 +02:00
David Bomba
15aefa698b Merge pull request #500 from turbo124/master
Update release endpoint
2023-03-01 11:31:05 +11:00
David Bomba
c9beedc84b Update release endpoint 2023-03-01 11:30:48 +11:00
David Bomba
d409d9696a Merge pull request #499 from turbo124/master
Update react files on init()
2023-02-28 19:33:49 +11:00
David Bomba
7d977a41e3 Update react files on init() 2023-02-28 19:33:17 +11:00
David Bomba
8db5c792a8 Merge pull request #496 from turbo124/master
Minor fixes for paths
2023-02-10 07:58:10 +11:00
David Bomba
b3768cbed3 Minor fixes for paths 2023-02-10 07:57:47 +11:00
David Bomba
25d2d1d271 Merge pull request #494 from turbo124/master
Build docker with react bundled
2023-02-09 19:20:30 +11:00
David Bomba
abfb5d1338 Build docker with react bundled 2023-02-08 23:30:51 +11:00
16 changed files with 126 additions and 56 deletions

View File

@@ -31,7 +31,7 @@ jobs:
uses: docker/setup-buildx-action@v1
- name: Cache Docker layers
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-4-${{ hashFiles('alpine/5/cache_buster') }}-${{ github.sha }}

View File

@@ -16,7 +16,7 @@ on:
jobs:
docker:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
@@ -31,7 +31,7 @@ jobs:
uses: docker/setup-buildx-action@v1
- name: Cache Docker layers
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-5-${{ hashFiles('alpine/5/cache_buster') }}-${{ github.sha }}
@@ -44,7 +44,7 @@ jobs:
with:
builder: ${{ steps.buildx.outputs.name }}
context: ./alpine/5/
build-args: INVOICENINJA_VERSION=5-stable
build-args: INVOICENINJA_VERSION=5-develop
target: prod
platforms: linux/amd64,linux/arm64
tags: invoiceninja/invoiceninja:cache
@@ -54,4 +54,4 @@ jobs:
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache

View File

@@ -11,7 +11,7 @@ on:
jobs:
docker:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v2
@@ -31,9 +31,9 @@ jobs:
if [[ $VERSION =~ ^5\.[0-9]{1,3}\.[0-9]{1,3}$ ]]; then
TAGS="$TAGS,${DOCKER_IMAGE}:latest"
fi
echo ::set-output name=tags::${TAGS}
echo ::set-output name=version::${VERSION}
echo ::set-output name=major::${MAJOR}
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "major=${MAJOR}" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
@@ -45,12 +45,12 @@ jobs:
uses: docker/setup-buildx-action@v1
- name: Cache Docker layers
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ steps.prep.outputs.major }}-${{ hashFiles('alpine/${{ steps.prep.outputs.major }}/cache_buster') }}-${{ github.sha }}
key: ${{ runner.os }}-buildx-5-${{ hashFiles('alpine/5/cache_buster') }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-${{ steps.prep.outputs.major }}-${{ hashFiles('alpine/${{ steps.prep.outputs.major }}/cache_buster') }}-
${{ runner.os }}-buildx-5-${{ hashFiles('alpine/5/cache_buster') }}-
- name: Login to DockerHub
if: github.event_name != 'pull_request'
@@ -79,4 +79,4 @@ jobs:
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
run: echo ${{ steps.docker_build.outputs.digest }}

View File

@@ -12,7 +12,7 @@ jobs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
@@ -55,7 +55,7 @@ jobs:
- "1.23.15"
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

View File

@@ -1,8 +1,14 @@
![Docker images](https://github.com/invoiceninja/dockerfiles/workflows/Docker%20images/badge.svg)
[![Docker image, latest](https://img.shields.io/docker/image-size/invoiceninja/invoiceninja/latest?label=latest)](https://hub.docker.com/r/invoiceninja/invoiceninja)
[![Docker image, alpine](https://img.shields.io/docker/image-size/invoiceninja/invoiceninja/alpine?label=alpine)](https://hub.docker.com/r/invoiceninja/invoiceninja)
[![Artifact HUB](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/invoiceninja)](https://artifacthub.io/packages/search?repo=invoiceninja)
[![Pusblish Image](https://github.com/invoiceninja/dockerfiles/actions/workflows/publish-image.yaml/badge.svg)](https://github.com/invoiceninja/dockerfiles/actions/workflows/publish-image.yaml) [![Cache v5 Image](https://github.com/invoiceninja/dockerfiles/actions/workflows/build-image-v5.yaml/badge.svg)](https://github.com/invoiceninja/dockerfiles/actions/workflows/build-image-v5.yaml)
[![Publish Image](https://github.com/invoiceninja/dockerfiles/actions/workflows/publish-image.yaml/badge.svg)](https://github.com/invoiceninja/dockerfiles/actions/workflows/publish-image.yaml)
[![Cache v5 Image](https://github.com/invoiceninja/dockerfiles/actions/workflows/build-image-v5.yaml/badge.svg)](https://github.com/invoiceninja/dockerfiles/actions/workflows/build-image-v5.yaml)
# Deprecation Notice
The master branch is not longer receiving active updates. We will continue to tag new releases whilst compatibility with underlying packages remains, however we will not be updating this image going forward.
Instead, please use the debian branch [here](https://github.com/invoiceninja/dockerfiles/tree/debian) this image is a completely fresh start based on the debian image and allows improved package support.
# Docker for [Invoice Ninja](https://www.invoiceninja.com/)

View File

@@ -1,34 +1,28 @@
ARG PHP_VERSION=8.1
ARG ALPINE_VERSION=3.20
ARG PHP_VERSION=8.2
ARG BAK_STORAGE_PATH=/var/www/app/docker-backup-storage/
ARG BAK_PUBLIC_PATH=/var/www/app/docker-backup-public/
# Get Invoice Ninja and install nodejs packages
FROM --platform=$BUILDPLATFORM node:lts-alpine as build
FROM --platform=$BUILDPLATFORM node:lts-alpine${ALPINE_VERSION} as nodebuild
# Download Invoice Ninja
ARG INVOICENINJA_VERSION
ADD https://github.com/invoiceninja/invoiceninja/tarball/v$INVOICENINJA_VERSION /tmp/ninja.tar.gz
ARG REPOSITORY=invoiceninja/invoiceninja
ARG FILENAME=invoiceninja.tar.gz
RUN set -eux; apk add curl unzip grep
# Extract Invoice Ninja
RUN mkdir -p /var/www/app \
&& tar --strip-components=1 -xf /tmp/ninja.tar.gz -C /var/www/app/ \
&& mkdir -p /var/www/app/public/logo /var/www/app/storage \
&& mv /var/www/app/.env.example /var/www/app/.env \
&& rm -rf /var/www/app/docs /var/www/app/tests
WORKDIR /var/www/app/
# Install node packages
ARG BAK_STORAGE_PATH
ARG BAK_PUBLIC_PATH
RUN --mount=target=/var/www/app/node_modules,type=cache \
npm install --production \
&& npm run production \
&& mv /var/www/app/storage $BAK_STORAGE_PATH \
&& mv /var/www/app/public $BAK_PUBLIC_PATH
RUN mkdir -p /var/www/app
RUN curl -sL "https://github.com/invoiceninja/invoiceninja/releases/latest/download/invoiceninja.tar.gz" | \
tar -xz -C /var/www/app/
RUN mkdir -p /var/www/app/public/logo /var/www/app/storage
WORKDIR /var/www/app
# Prepare php image
FROM php:${PHP_VERSION}-fpm-alpine3.15 as prod
FROM php:${PHP_VERSION}-fpm-alpine${ALPINE_VERSION} as phpbuild
LABEL maintainer="David Bomba <turbo124@gmail.com>"
@@ -42,6 +36,16 @@ RUN mv /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini
# https://hub.docker.com/r/mlocati/php-extension-installer/tags
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
# Install chromium
RUN set -eux; \
apk add --no-cache \
font-isas-misc \
supervisor \
mysql-client \
chromium \
ttf-freefont \
ttf-dejavu
RUN install-php-extensions \
bcmath \
exif \
@@ -51,19 +55,10 @@ RUN install-php-extensions \
opcache \
pdo_mysql \
zip \
intl \
@composer \
&& rm /usr/local/bin/install-php-extensions
# Install chromium
RUN set -eux; \
apk add --no-cache \
font-isas-misc \
supervisor \
mysql-client \
git \
chromium \
ttf-freefont
# Copy files
COPY rootfs /
@@ -79,6 +74,8 @@ RUN addgroup --gid=$UID -S "$INVOICENINJA_USER" \
--ingroup "$INVOICENINJA_USER" \
"$INVOICENINJA_USER"
WORKDIR /var/www/app
# Set up app
ARG INVOICENINJA_VERSION
ARG BAK_STORAGE_PATH
@@ -86,14 +83,30 @@ ARG BAK_PUBLIC_PATH
ENV INVOICENINJA_VERSION $INVOICENINJA_VERSION
ENV BAK_STORAGE_PATH $BAK_STORAGE_PATH
ENV BAK_PUBLIC_PATH $BAK_PUBLIC_PATH
COPY --from=build --chown=$INVOICENINJA_USER:$INVOICENINJA_USER /var/www/app /var/www/app
COPY --from=nodebuild --chown=$INVOICENINJA_USER:$INVOICENINJA_USER /var/www/app /var/www/app
RUN rm -rf /var/www/app/ui
USER $UID
WORKDIR /var/www/app
# Do not remove this ENV
ENV IS_DOCKER true
RUN /usr/local/bin/composer install --no-dev --quiet
FROM --platform=$BUILDPLATFORM nodebuild AS dependencybuild
WORKDIR /var/www/app
COPY --from=phpbuild /var/www/app /var/www/app
# # Install node packages
ARG BAK_STORAGE_PATH
ARG BAK_PUBLIC_PATH
RUN mv /var/www/app/storage $BAK_STORAGE_PATH \
&& mv /var/www/app/public $BAK_PUBLIC_PATH
FROM phpbuild as prod
COPY --from=dependencybuild --chown=$INVOICENINJA_USER:$INVOICENINJA_USER /var/www/app /var/www/app
# Override the environment settings from projects .env file
ENV APP_ENV production

View File

@@ -1 +1 @@
Fri Jul 2 7:33:22 +00 2021
Fri Jul 4 7:33:22 +00 2023

View File

@@ -1,6 +1,7 @@
#!/bin/sh
php artisan db:seed --force
php artisan cache:clear
# Build up array of arguments...
if [[ ! -z "${IN_USER_EMAIL}" ]]; then
@@ -11,4 +12,4 @@ if [[ ! -z "${IN_PASSWORD}" ]]; then
password="--password ${IN_PASSWORD}"
fi
php artisan ninja:create-account $email $password
php artisan ninja:create-account $email $password

View File

@@ -27,6 +27,7 @@ docker_process_init_files() {
php artisan config:cache
php artisan optimize
php artisan package:discover
# Check if DB works, if not crash the app.
DB_READY=$(php artisan tinker --execute='echo app()->call("App\Utils\SystemHealth@dbCheck")["success"];')

View File

@@ -13,11 +13,11 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.10.1
version: 0.10.2
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 5.5.49
appVersion: 5.6.24
keywords:
- invoiceninja
home: https://invoiceninja.github.io/dockerfiles

View File

@@ -18,7 +18,7 @@
image:
registry: docker.io
repository: invoiceninja/invoiceninja
tag: 5.5.49
tag: 5.6.24
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
## ref: http://kubernetes.io/docs/user-guide/images/#pre-pulling-images
##

View File

@@ -16,6 +16,11 @@ server {
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
location ~* /storage/.*\.php$ {
return 503;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass app:9000;

18
config/php/php-cli.ini Normal file
View File

@@ -0,0 +1,18 @@
session.auto_start = Off
short_open_tag = Off
error_reporting = E_ALL & ~E_NOTICE & ~E_WARNING & ~E_STRICT & ~E_DEPRECATED
; opcache.enable_cli=1
; opcache.fast_shutdown=1
; opcache.memory_consumption=256
; opcache.interned_strings_buffer=8
; opcache.max_accelerated_files=4000
; opcache.revalidate_freq=60
; # http://symfony.com/doc/current/performance.html
; realpath_cache_size = 4096K
; realpath_cache_ttl = 600
memory_limit = 2G
post_max_size = 60M
upload_max_filesize = 50M

21
config/php/php.ini Normal file
View File

@@ -0,0 +1,21 @@
session.auto_start = Off
short_open_tag = Off
error_reporting = E_ALL & ~E_NOTICE & ~E_WARNING & ~E_STRICT & ~E_DEPRECATED
; opcache.enable=1
; opcache.preload=/var/www/app/preload.php
; opcache.preload_user=www-data
; ; The OPcache shared memory storage size.
; opcache.max_accelerated_files=300000
; opcache.validate_timestamps=1
; opcache.revalidate_freq=30
; opcache.jit_buffer_size=256M
; opcache.jit=1205
; opcache.memory_consumption=1024M
post_max_size = 60M
upload_max_filesize = 50M
memory_limit=512M

View File

@@ -30,6 +30,9 @@ services:
- ./config/hosts:/etc/hosts:ro
- ./docker/app/public:/var/www/app/public:rw,delegated
- ./docker/app/storage:/var/www/app/storage:rw,delegated
- ./config/php/php.ini:/usr/local/etc/php/php.ini
- ./config/php/php-cli.ini:/usr/local/etc/php/php-cli.ini
depends_on:
- db
networks:
@@ -44,8 +47,6 @@ services:
# For auto DB backups comment out image and use the build block below
# build:
# context: ./config/mysql
ports:
- "3305:3306"
restart: always
env_file: env
volumes:

4
env
View File

@@ -40,6 +40,10 @@ MYSQL_USER=ninja
MYSQL_PASSWORD=ninja
MYSQL_DATABASE=ninja
# GoCardless/Nordigen API key for banking integration
NORDIGEN_SECRET_ID=
NORDIGEN_SECRET_KEY=
# V4 env vars
# DB_STRICT=false
# APP_CIPHER=AES-256-CBC