Commit Graph

25 Commits

Author SHA1 Message Date
Darko Gjorgjijoski
ae035498c6 fix(docker): recreate storage directories on container start (#702)
Fixes InvoiceShelf/docker#75 and #69, and gives InvoiceShelf/docker#77
and #63 an actionable error instead of a cryptic one.

storage/framework/{cache,sessions,views}, storage/logs and storage/app
hold no tracked content — only .gitignore stubs — so nothing guarantees
they exist inside a mounted volume. Docker seeds a named volume from the
image exactly once, when the volume is empty, and never again: a volume
created by an older image keeps whatever it had through every subsequent
upgrade. When those directories are absent Laravel dies at boot with
"Please provide a valid cache path", because config/view.php resolves its
compiled path with realpath(), which returns false for a missing
directory. The sqlite branch also cannot place its database.

Reproduced against a locally built image: deleting storage/framework from
a named volume fails the container with exactly that message, and passes
with this change.

The chown is guarded on being root. The image runs as www-data (uid 82),
where chown of a foreign-owned file is EPERM and, under `set -e`, would
stop the container from starting at all — which is the likely reason it
was dropped from this tree previously. Guarding it keeps the benefit for
anyone running as root without that failure mode.

A mount the container genuinely cannot write to is not something the
entrypoint can fix, so it now says so and names the remedy, rather than
letting the failure surface later as a Laravel stack trace.
2026-07-29 12:20:28 +02:00
Darko Gjorgjijoski
552da3ca84 feat(devenv): make the Gotenberg compose stacks work out of the box (#699)
Choosing Gotenberg in ./devenv started the `pdf` sidecar and configured
nothing else, so the app still defaulted to dompdf. Pointing it at the
sidecar by hand then hit the SSRF guard, because `pdf` resolves to a
private address on the compose network — the failure #691 fixed, hit
from inside our own dev environment.

The three gotenberg compose files now set PDF_DRIVER, GOTENBERG_HOST and
GOTENBERG_ALLOWED_PRIVATE_HOST on php-fpm, so the stack renders through
the sidecar with no .env editing at all. The serversideup pool config
already sets `clear_env = no`, so these reach the workers; verified by
generating a real invoice PDF end to end (24967 bytes, %PDF-1.4).

Setting the environment in compose rather than writing to .env keeps the
devenv script from mutating a developer's own file — it does not touch
.env today, and the values belong to the compose file the developer
selected. Non-Docker setups have the same keys documented in .env.example.

devenv now prints what it configured, including that the compose file
exempts that one host from the SSRF guard, since a security control being
relaxed should not be silent.
2026-07-29 11:08:24 +02:00
Darko Gjorgjijoski
209a766c8c ci(docker): authenticate composer against GitHub in the image build
Multi-arch builds run composer (incl. the merge-plugin's update) twice and exhausted GitHub's unauthenticated API rate limit, failing with 'Could not authenticate against github.com'. Pass the Actions token as a build secret and feed it to composer via COMPOSER_AUTH (build-time only, never in the image).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 00:32:02 +02:00
Darko Gjorgjijoski
c04b84e5b5 ci(docker): release-driven tags, drop nightly cron, add 3.x pre-release channel
Remove the scheduled nightly/alpha builds; gate :latest on a single LATEST_MAJOR; publish :beta/:next for pre-releases; keep a transitional :nightly alias on stable. Also fix the production Dockerfile so a stale host public/build can no longer clobber the freshly built frontend (reorder COPY, ignore public/build).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 23:42:11 +02:00
Darko Gjorgjijoski
e48212b18a build: migrate frontend tooling to pnpm (v3) (#678)
* build: migrate frontend tooling to pnpm (v3)

Rebuilds the stale #673 on current 3.x so it doesn't revert #657's test
split, the Node-24 action bumps, or composer-install@4.0.0.

- package.json: packageManager pnpm@11.6.0; drop dead 'resolutions'
- pnpm-workspace.yaml: nodeLinker hoisted, allowBuilds vue-demi,
  overrides brace-expansion (replaces resolutions)
- pnpm-lock.yaml generated via 'pnpm import' from yarn.lock (keeps the
  resolved versions, incl. vite 8.0.3 / rolldown rc.12); yarn.lock removed
- docker.yaml + release.yaml: pnpm/action-setup@v6 + cache pnpm + pnpm
  install/build (action versions and the #657 split left intact; check.yaml
  needs no change — its test job is PHP-only after #657)
- 3 Dockerfiles: node:24 + corepack + pnpm install --frozen-lockfile && pnpm build
- Makefile, composer 'dev' script, CLAUDE.md, .gitignore -> pnpm

* fix(deps): pin vite to 8.0.5 (security)

Now that 3.x is the default branch, Dependabot flags vite <8.0.5. Pin to
8.0.5 (the patched version), which keeps rolldown 1.0.0-rc.12 — still
below 8.0.15 where the broken rolldown 1.0.3 (the init_runtime_dom_esm_bundler
chunk regression) starts, so the build stays clean. Mirrors v2's #674.
2026-06-12 14:04:16 +02:00
Darko Gjorgjijoski
9c3013bb24 Add cache clearing and auto-migrate to Docker entrypoint
Clears config and application cache on every container start to
prevent stale provider references after image updates. Creates the
storage symlink and runs pending migrations if the app is already
installed.

Fixes #614
2026-04-07 02:17:18 +02:00
Darko Gjorgjijoski
08dfe62312 Standardize Node.js version to 24 (#599)
Update Node.js from 20 to 24 across CI workflows, Dockerfiles,
package.json engines field, and add .node-version file for consistent
local development.
2026-04-02 17:08:39 +02:00
Rihards Simanovics
d754c4d29e fix: return missing development docker sql dependencies
Fixes #586
2026-03-27 00:18:15 +00:00
Rihards Simanovics
8de32e27d3 fix: return missing production docker sql dependencies
Fixes #586
2026-03-27 00:17:56 +00:00
mchev
d4e19646ee fix(ci): install deps on PHP 8.4 (Symfony 8 requires >=8.4) 2026-03-21 19:03:37 +01:00
Darko Gjorgjijoski
a30b2e751b Pin PHP version to 8.4 in development Dockerfile 2026-02-06 00:57:13 +01:00
Darko Gjorgjijoski
18d63a3375 Configurations cleanup & database configurations for mail and pdfs (#479)
* Move Mail, PDF configuration to Database, standardize configurations

* Set default currency to USD on install

* Pint code
2025-09-19 15:42:53 +02:00
Darko Gjorgjijoski
5aa54dbd86 Fix docker asset url (#472) 2025-09-08 17:52:33 +02:00
Darko Gjorgjijoski
58b262fe32 Fix path to sqlite.empty.db in setup script 2025-09-08 14:19:59 +02:00
lupus
f8c4e63b3f Fix: broken file links for development files (#469)
* FIx broken file links for development files

* Fix: Compose Files Context / Paths / Networks
2025-09-07 14:16:39 +02:00
Darko Gjorgjijoski
770da45dbf Production docker improvements (#463)
* Update production dockerfiles for testing

* Add bash, nano and remove unecessary sqlite3 alpine package
2025-09-02 03:27:26 +02:00
Darko Gjorgjijoski
8842d6a626 Development Environment (#459)
* Fix SQLite docker build related issues

* Add devenv for development
2025-09-01 11:47:58 +02:00
Darko Gjorgjijoski
f1635bcef8 Fix SQLite docker build related issues (#458) 2025-09-01 02:42:07 +02:00
Darko Gjorgjijoski
3d327a1735 Add SQLite command line utility to docker images 2025-08-31 21:35:15 +02:00
Darko Gjorgjijoski
a6ce294497 Update sqlite path 2025-08-31 20:57:45 +02:00
Darko Gjorgjijoski
23f6b1877f 🚢 Simplified docker builds (#456)
* Simplify docker builds

* Ignore docker and frontend scripts from PHP related checks

* Update docker development setup
2025-08-31 15:07:22 +02:00
Darko Gjorgjijoski
89f6f02d1f Move docker to a separate repository 2024-01-30 07:49:00 +02:00
gdarko
a6b54d925c Update cron docker image to use Debian 2024-01-29 14:56:26 +01:00
gdarko
f87705155e Replace ? with '' 2024-01-29 11:22:24 +01:00
gdarko
613d6c2cb2 Refactor CI, Build docker on push 2024-01-29 11:20:11 +01:00