Skip to content

Build Akaunting app into published images - #20

Open
henmohr wants to merge 3 commits into
mainfrom
build-akaunting-app-image
Open

henmohr wants to merge 3 commits into
mainfrom
build-akaunting-app-image

Conversation

@henmohr

@henmohr henmohr commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • build the Akaunting source, LibreCode patch, Composer production dependencies, and frontend assets inside the PHP and Nginx images
  • move persistent runtime data to volumes/akaunting-data instead of mounting the whole app tree
  • update the Docker publish workflow to build from the repository context with AKAUNTING_VERSION=3.2.3

Validation

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-15T13:19:57.533863Z 718cfc4 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 718cfc4b89

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docker-compose.yml
AKAUNTING_VERSION: ${AKAUNTING_VERSION:-3.2.3}
volumes:
- ./volumes/akaunting:/var/www/html
- ./volumes/akaunting-data:/var/www/akaunting-data

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Persist App Store modules outside the PHP container

When an app is installed through Akaunting's App Store, its runtime files and web assets are written under /var/www/html/modules; the existing .docker/nginx/conf.d/http.conf:47-49 explicitly expects to serve assets from that directory. This replacement volume persists only .env, storage, and bootstrap/cache, so installed modules are lost when the PHP container is recreated and their assets are never visible in the separate Nginx container even before recreation. Mount the modules directory into both services, writable from PHP and readable from Nginx.

Useful? React with 👍 / 👎.

Comment thread docker-compose.yml
services:
akaunting.php:
build: .docker/php
image: ghcr.io/librecodecoop/akaunting-docker-php:${AKAUNTING_IMAGE_TAG:-main}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Honor AKAUNTING_VERSION when selecting images

When the published main image exists, changing AKAUNTING_VERSION and running the documented docker compose pull/up sequence still runs that prebuilt image, whose workflow fixes Akaunting at 3.2.3; the build argument is used only when a local build actually occurs. This also follows Compose's documented behavior when image and build coexist: it pulls the image first and builds only if it is not found. Consequently, the README's supported version-selection path silently deploys the wrong version unless users explicitly build; either connect the version to the image tag or require an explicit build.

Useful? React with 👍 / 👎.

Comment thread .docker/php/entrypoint.sh
fi
cp .env.example .env
rm -rf /var/www/html/bootstrap/cache
ln -s "${AKAUNTING_DATA_DIR}/bootstrap/cache" /var/www/html/bootstrap/cache

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Rebuild bootstrap cache after image upgrades

On an image upgrade, this symlink reuses bootstrap/cache files generated by the previous image's Composer dependency set instead of the package and service manifests built into the new image. Laravel loads those manifests while bootstrapping every request and Artisan command, so a dependency/provider change can make the new container fail before the documented optimize:clear command can repair it. Keep this generated cache writable but image-local, or clear and repopulate it from the new image before booting.

Useful? React with 👍 / 👎.

@vitormattos vitormattos left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should simplify this before adding an image build pipeline.

Some application customizations are deployment-specific and should not become part of the public Docker image or this repository. We can keep the Docker setup generic and apply environment-specific customizations separately, for example through Compose overrides or deployment configuration.

First, I think we should validate if the official Akaunting image can be used as our base. Then we can keep only the infrastructure that is actually required here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants