Skip to content

release: dev → main#117

Open
TatevikGr wants to merge 27 commits into
mainfrom
dev
Open

release: dev → main#117
TatevikGr wants to merge 27 commits into
mainfrom
dev

Conversation

@TatevikGr

@TatevikGr TatevikGr commented May 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Thanks for contributing to phpList!

Summary by CodeRabbit

  • New Features

    • Added a modern Vue-based web frontend featuring CKEditor and ApexCharts.
  • Chores

    • Improved container setup: Apache listens on 8081, production cache/log prep on startup, and cache/log directories are mounted.
    • Added automated frontend asset building (Composer script + Node/Yarn tooling) and updated README guidance.
    • Extended Docker build and added a multi-arch Docker Hub publish workflow; updated ignore files.
  • Tests

    • Improved PHPUnit test bootstrapping and added coverage to ensure /api/v2 returns 200.

@coderabbitai

coderabbitai Bot commented May 18, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: be7ffd94-a38c-4509-98cb-13c817ec088a

📥 Commits

Reviewing files that changed from the base of the PR and between 44f96e5 and 0411008.

⛔ Files ignored due to path filters (2)
  • composer.lock is excluded by !**/*.lock
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (4)
  • composer.json
  • docker-compose.yml
  • package.json
  • tests/System/HttpEndpoints/WebFrontEndTest.php
🚧 Files skipped from review as they are similar to previous changes (3)
  • package.json
  • composer.json
  • docker-compose.yml

📝 Walkthrough

Walkthrough

This PR adds a Vue 3 frontend build pipeline, Composer asset-generation wiring, Docker-based asset builds, Apache port 8081 configuration, Docker image publishing, and updated test bootstrap and endpoint validation.

Changes

Frontend Build Pipeline Integration

Layer / File(s) Summary
Frontend build tooling
webpack.config.js, postcss.config.js, package.json
Adds Symfony Webpack Encore, Vue, PostCSS/Tailwind configuration, frontend scripts, and application/build dependencies.
Composer asset build and PHP wiring
composer.json, README.md
Adds the frontend build script, registers Nelmio CORS, updates dependencies, adds a VCS repository, and documents asset generation.
Docker image build
Dockerfile
Adds PHP GD support, installs Node.js and Yarn, includes frontend manifests in the dependency layer, and builds frontend assets during image creation.
Docker runtime and Apache configuration
docker-compose.yml, docker/apache/*
Configures port 8081, application URLs, persistent runtime directories, startup permissions, and Apache serving directives.
Docker publishing workflow
.github/workflows/docker-publish.yml
Builds and publishes multi-architecture Docker images for configured push and manual events.
Test bootstrap and endpoint validation
tests/bootstrap.php, phpunit.xml.dist, tests/System/HttpEndpoints/WebFrontEndTest.php
Adds test initialization, updates PHPUnit bootstrap configuration, and validates that /api/v2 returns status 200.
Build context and VCS ignore rules
.dockerignore, .gitignore
Updates ignored runtime, generated-asset, environment, Docker, and Node dependency paths.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant DockerBuild
  participant Composer
  participant Yarn
  participant WebpackEncore
  DockerBuild->>Composer: run build-web-frontend-assets
  Composer->>Yarn: yarn install
  Composer->>Yarn: yarn build:web-frontend
  Yarn->>WebpackEncore: execute frontend build
  WebpackEncore-->>DockerBuild: generate public/build assets
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title is a generic release/branch-merge label and does not describe the main code changes. Use a concise, descriptive title that highlights the primary change, such as adding the web frontend build and Docker deployment updates.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch dev

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.3.8)
composer.json

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

docker-compose.yml

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

package.json

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai 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.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
.gitignore (1)

1-1: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Remove repository-wide wildcard ignore at root.

Line 1 (*) causes Git to ignore essentially all new files, which can break normal staging workflows and makes subsequent rules ineffective unless explicit negations are added.

Suggested fix
-*
 *.bak
 /.idea/
 /.project
 /.webprj
 /bin/
 /config/bundles.yml
 /config/config_modules.yml
 /config/parameters.yml
 /config/routing_modules.yml
 /nbproject
 /public/
 /var/
 /vendor/
 /node_modules/
 .DS_Store
 .vagrant
 .phpunit.result.cache
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.gitignore at line 1, Remove the repository-wide wildcard entry '*' from
.gitignore (the root wildcard that ignores all new files) and replace it with
either specific ignore patterns (e.g., editor backups, build artifacts, OS
files) or move broad personal ignores to a global git exclude via git config
--global core.excludesfile; if you intended to ignore everything except a few
files, convert to explicit negation rules instead of '*'. Ensure you update the
existing .gitignore entry that currently contains '*' to one of these safer
options so normal staging and subsequent ignore rules work correctly.
Dockerfile (1)

47-50: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

composer install runs scripts before bin/console exists.

composer install is executed before COPY . ., but post-install scripts call php bin/console. This can break the image build.

🐛 Proposed fix
-RUN composer install --no-dev --no-interaction --prefer-dist --optimize-autoloader
+RUN composer install --no-dev --no-interaction --prefer-dist --optimize-autoloader --no-scripts

 # Copy the rest of the application (except files ignored by .dockerignore)
 COPY . .
+
+# Run project scripts after app sources (including bin/console) are present
+RUN composer run-script post-install-cmd
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Dockerfile` around lines 47 - 50, The Dockerfile runs "composer install"
before "COPY . .", which triggers Composer post-install scripts that call "php
bin/console" when bin/console doesn't exist yet; either move the "COPY . ." step
so that the application files (including bin/console) are copied before running
"composer install", or change the composer step to "composer install
--no-scripts --no-dev --no-interaction --prefer-dist --optimize-autoloader" and
then run "composer run scripts" (or "composer install" without --no-scripts)
after the COPY so post-install scripts can find bin/console.
🧹 Nitpick comments (1)
postcss.config.js (1)

2-5: ⚡ Quick win

Remove redundant autoprefixer from the Tailwind v4 pipeline.

With Tailwind v4, @tailwindcss/postcss automatically handles vendor prefixing and minification through Lightning CSS, making Autoprefixer unnecessary.

♻️ Proposed change
 module.exports = {
     plugins: [
         require('`@tailwindcss/postcss`'),
-        require('autoprefixer'),
     ],
 };
 // package.json (devDependencies)
-    "autoprefixer": "^10.4.27",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@postcss.config.js` around lines 2 - 5, The plugins array in postcss.config.js
includes require('autoprefixer') which is redundant with Tailwind v4's
require('`@tailwindcss/postcss`'); remove the require('autoprefixer') entry from
the plugins array so only require('`@tailwindcss/postcss`') remains, and ensure
the plugins array syntax remains valid after removal.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@composer.json`:
- Around line 94-97: The build script "build-web-frontend-assets" uses a
non-deterministic "yarn install"; replace that command with a lockfile-enforced
install: use "yarn install --frozen-lockfile" if the repo uses Yarn v1, or "yarn
install --immutable" if it uses Yarn v2+/Berry; update the
"build-web-frontend-assets" array accordingly and ensure CI uses the same Yarn
major version.

In `@docker-compose.yml`:
- Line 4: Remove the hard-coded personal registry image tag currently set via
the image: key in docker-compose (the "tatevikg1/phplist:test" entry) and
replace it with a project-local tag or omit the image: line so the service uses
its local build context (build: .); update the compose service definition that
contains the image: key to either use a neutral project image name (e.g.,
phplist:local) or delete the image: line entirely to rely on the existing build:
. configuration.

In `@tests/System/HttpEndpoints/WebFrontEndTest.php`:
- Line 49: The current weak assertion in testHomepageReturnsContent uses
assertNotEquals(500, $response->getStatusCode()) which allows other error codes;
update the assertion to assert a successful HTTP result instead — e.g. replace
the not-equals check with a positive check such as asserting
$response->isSuccessful() (or assertEquals(200, $response->getStatusCode()) or
assertThat the status is in the 2xx range) so the test in
testHomepageReturnsContent reliably verifies successful content delivery.

---

Outside diff comments:
In @.gitignore:
- Line 1: Remove the repository-wide wildcard entry '*' from .gitignore (the
root wildcard that ignores all new files) and replace it with either specific
ignore patterns (e.g., editor backups, build artifacts, OS files) or move broad
personal ignores to a global git exclude via git config --global
core.excludesfile; if you intended to ignore everything except a few files,
convert to explicit negation rules instead of '*'. Ensure you update the
existing .gitignore entry that currently contains '*' to one of these safer
options so normal staging and subsequent ignore rules work correctly.

In `@Dockerfile`:
- Around line 47-50: The Dockerfile runs "composer install" before "COPY . .",
which triggers Composer post-install scripts that call "php bin/console" when
bin/console doesn't exist yet; either move the "COPY . ." step so that the
application files (including bin/console) are copied before running "composer
install", or change the composer step to "composer install --no-scripts --no-dev
--no-interaction --prefer-dist --optimize-autoloader" and then run "composer run
scripts" (or "composer install" without --no-scripts) after the COPY so
post-install scripts can find bin/console.

---

Nitpick comments:
In `@postcss.config.js`:
- Around line 2-5: The plugins array in postcss.config.js includes
require('autoprefixer') which is redundant with Tailwind v4's
require('`@tailwindcss/postcss`'); remove the require('autoprefixer') entry from
the plugins array so only require('`@tailwindcss/postcss`') remains, and ensure
the plugins array syntax remains valid after removal.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 40e54fb2-fbc9-4018-9810-9466038bdea5

📥 Commits

Reviewing files that changed from the base of the PR and between 6b8196b and 0f28f6e.

⛔ Files ignored due to path filters (2)
  • composer.lock is excluded by !**/*.lock
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (12)
  • .dockerignore
  • .gitignore
  • Dockerfile
  • README.md
  • composer.json
  • docker-compose.yml
  • package.json
  • phpunit.xml.dist
  • postcss.config.js
  • tests/System/HttpEndpoints/WebFrontEndTest.php
  • tests/bootstrap.php
  • webpack.config.js

Comment thread composer.json
Comment on lines +94 to +97
"build-web-frontend-assets": [
"yarn install",
"yarn build:web-frontend"
],

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Make frontend dependency installation deterministic.

Using plain yarn install can produce drift across image builds. Enforce lockfile-based install in this script.

🔒 Proposed change
 "build-web-frontend-assets": [
-    "yarn install",
+    "yarn install --frozen-lockfile --non-interactive",
     "yarn build:web-frontend"
 ],
For the Yarn version used here, what is the correct deterministic CI install flag (`--frozen-lockfile` vs `--immutable`)?
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@composer.json` around lines 94 - 97, The build script
"build-web-frontend-assets" uses a non-deterministic "yarn install"; replace
that command with a lockfile-enforced install: use "yarn install
--frozen-lockfile" if the repo uses Yarn v1, or "yarn install --immutable" if it
uses Yarn v2+/Berry; update the "build-web-frontend-assets" array accordingly
and ensure CI uses the same Yarn major version.

Comment thread docker-compose.yml
app:
build: .
image: phplist/base-distribution:latest
image: tatevikg1/phplist:test

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Avoid committing a personal registry image tag in default compose config.

Keeping tatevikg1/phplist:test here can accidentally pull/use an external personal image in shared workflows. Prefer a project-local tag or omit image for default local builds.

🔧 Proposed change
-    image: tatevikg1/phplist:test
+    image: phplist/base-distribution:local

or remove the image: line entirely and rely on build: ..

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
image: tatevikg1/phplist:test
image: phplist/base-distribution:local
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docker-compose.yml` at line 4, Remove the hard-coded personal registry image
tag currently set via the image: key in docker-compose (the
"tatevikg1/phplist:test" entry) and replace it with a project-local tag or omit
the image: line so the service uses its local build context (build: .); update
the compose service definition that contains the image: key to either use a
neutral project image name (e.g., phplist:local) or delete the image: line
entirely to rely on the existing build: . configuration.

Comment thread tests/System/HttpEndpoints/WebFrontEndTest.php Outdated
* release: dev → main (add frontend build system) (#110)



    New Features
        Modern frontend build and bundling setup with Node/Yarn support and asset compilation
        CORS support enabled for API compatibility

    Chores
        Updated build tooling and runtime dependencies; added image processing support in the runtime environment
        Docker and compose improvements for build steps and persistent logs/cache; adjusted ignore rules

    Tests
        Added test bootstrap and improved server-error assertion in endpoint tests

    Documentation
        Added instructions to build and publish frontend assets

---------

Co-authored-by: Tatevik <tatevikg1@gmail.com>

* Add dockerhub publish workflow

* Fix docker compose configs

* Update docker-publish workflow to trigger on main and dev branches

* Add todo

* Update tags strategy in docker-publish workflow

---------

Co-authored-by: Tatevik <tatevikg1@gmail.com>

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

♻️ Duplicate comments (2)
.github/workflows/docker-publish.yml (1)

14-14: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Move CI publish target off a personal DockerHub namespace.

Line 14 points releases to a personal repo; this is fragile for org-owned publishing and release provenance.

Suggested fix
-  DOCKERHUB_IMAGE: tatevikg1/phplist4
+  DOCKERHUB_IMAGE: phplist/base-distribution
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/docker-publish.yml at line 14, The CI is publishing to a
personal DockerHub namespace via the DOCKERHUB_IMAGE variable; change the value
of DOCKERHUB_IMAGE to point at the organisation-owned image (or a generic org
repository) instead of "tatevikg1/phplist4", and update any related workflow
references to use that variable; if necessary, coordinate with org owners to use
the org DockerHub repository name or a repository dispatch/secret
(DOCKERHUB_IMAGE) that references the canonical org image for releases.
docker-compose.yml (1)

5-5: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Use a neutral default image tag in shared compose config.

Line 5 still hard-codes a personal registry image, which can cause teams/CI to pull unintended images by default.

Suggested fix
-    image: tatevikg1/phplist:test
+    image: phplist/base-distribution:local
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docker-compose.yml` at line 5, The docker-compose.yml currently hard-codes a
personal registry image "tatevikg1/phplist:test"; change this to a neutral
default image tag (e.g., replace the image value with a team/official or generic
tag such as "phplist:latest" or remove the image key and use a build/context
reference) so shared configs and CI do not pull a personal image by default;
update the image field in docker-compose.yml accordingly and ensure any related
service name remains unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/docker-publish.yml:
- Line 23: The workflow currently uses floating tags for actions (e.g.,
actions/checkout, docker/setup-qemu-action, docker/setup-buildx-action,
docker/login-action, docker/metadata-action, docker/build-push-action); replace
each `uses:` entry with the corresponding immutable commit SHA (pin to a full
commit ref like actions/checkout@<SHA>) to reduce supply-chain risk, updating
all occurrences of those symbols in the workflow file (the instances referenced
in the review) so none remain on major/minor tags.

In `@docker-compose.yml`:
- Around line 17-19: The docker-compose env values REST_API_BASE_URL,
FRONT_END_BASE_URL and API_BASE_URL currently point to the internal Docker
hostname "http://app:8081/" which browsers cannot resolve; change them to a
host-reachable URL by replacing "app" with a public host/port variable (for
example use an interpolated env var like ${PUBLIC_HOST}:${PHPLIST_PORT} or
${HOST}:${PHPLIST_PORT} or a full external URL) so the browser-facing base URLs
resolve outside the Docker network; update the three keys (REST_API_BASE_URL,
FRONT_END_BASE_URL, API_BASE_URL) to reference the public-facing environment
variable(s) instead of the internal service name.

---

Duplicate comments:
In @.github/workflows/docker-publish.yml:
- Line 14: The CI is publishing to a personal DockerHub namespace via the
DOCKERHUB_IMAGE variable; change the value of DOCKERHUB_IMAGE to point at the
organisation-owned image (or a generic org repository) instead of
"tatevikg1/phplist4", and update any related workflow references to use that
variable; if necessary, coordinate with org owners to use the org DockerHub
repository name or a repository dispatch/secret (DOCKERHUB_IMAGE) that
references the canonical org image for releases.

In `@docker-compose.yml`:
- Line 5: The docker-compose.yml currently hard-codes a personal registry image
"tatevikg1/phplist:test"; change this to a neutral default image tag (e.g.,
replace the image value with a team/official or generic tag such as
"phplist:latest" or remove the image key and use a build/context reference) so
shared configs and CI do not pull a personal image by default; update the image
field in docker-compose.yml accordingly and ensure any related service name
remains unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 34d6192e-060d-4004-b699-d83a25572ee5

📥 Commits

Reviewing files that changed from the base of the PR and between 0f28f6e and 8aef04b.

📒 Files selected for processing (5)
  • .github/workflows/docker-publish.yml
  • docker-compose.yml
  • docker/apache/000-default.conf
  • docker/apache/ports.conf
  • docker/apache/servername.conf
✅ Files skipped from review due to trivial changes (3)
  • docker/apache/ports.conf
  • docker/apache/servername.conf
  • docker/apache/000-default.conf

contents: read
steps:
- name: Checkout
uses: actions/checkout@v4

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify all `uses:` entries in workflows and find non-SHA refs.
rg -n --type=yaml '^\s*uses:\s*[^@]+@' .github/workflows \
  | rg -n -v '@[0-9a-fA-F]{40}$'

Repository: phpList/base-distribution

Length of output: 798


🏁 Script executed:

cat -n .github/workflows/docker-publish.yml | head -60

Repository: phpList/base-distribution

Length of output: 1947


Pin GitHub Actions to immutable SHAs instead of floating version tags.

Using floating major tags for build/publish actions increases supply-chain risk. Pin all uses: entries to full commit SHAs.

Lines 23, 26, 29, 33, 40, 50 currently use:

  • actions/checkout@v4
  • docker/setup-qemu-action@v3
  • docker/setup-buildx-action@v3
  • docker/login-action@v3
  • docker/metadata-action@v5
  • docker/build-push-action@v6

Replace with specific SHAs (e.g., actions/checkout@a5ac7e51b41094c5405359c7b978efb3c90df8be).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/docker-publish.yml at line 23, The workflow currently uses
floating tags for actions (e.g., actions/checkout, docker/setup-qemu-action,
docker/setup-buildx-action, docker/login-action, docker/metadata-action,
docker/build-push-action); replace each `uses:` entry with the corresponding
immutable commit SHA (pin to a full commit ref like actions/checkout@<SHA>) to
reduce supply-chain risk, updating all occurrences of those symbols in the
workflow file (the instances referenced in the review) so none remain on
major/minor tags.

Comment thread docker-compose.yml
Comment on lines +17 to +19
REST_API_BASE_URL: 'http://app:8081/'
FRONT_END_BASE_URL: 'http://app:8081/'
API_BASE_URL: 'http://app:8081/'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Avoid internal-only hostname for browser-facing base URLs.

Line 17-19 use http://app:8081/; that hostname is Docker-network internal and is usually not resolvable by end-user browsers. Prefer host-reachable URLs (for example via ${PHPLIST_PORT} / external host env).

Suggested fix
-      REST_API_BASE_URL: 'http://app:8081/'
-      FRONT_END_BASE_URL: 'http://app:8081/'
-      API_BASE_URL: 'http://app:8081/'
+      REST_API_BASE_URL: ${REST_API_BASE_URL:-http://localhost:${PHPLIST_PORT:-8081}/}
+      FRONT_END_BASE_URL: ${FRONT_END_BASE_URL:-http://localhost:${PHPLIST_PORT:-8081}/}
+      API_BASE_URL: ${API_BASE_URL:-http://localhost:${PHPLIST_PORT:-8081}/}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
REST_API_BASE_URL: 'http://app:8081/'
FRONT_END_BASE_URL: 'http://app:8081/'
API_BASE_URL: 'http://app:8081/'
REST_API_BASE_URL: ${REST_API_BASE_URL:-http://localhost:${PHPLIST_PORT:-8081}/}
FRONT_END_BASE_URL: ${FRONT_END_BASE_URL:-http://localhost:${PHPLIST_PORT:-8081}/}
API_BASE_URL: ${API_BASE_URL:-http://localhost:${PHPLIST_PORT:-8081}/}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docker-compose.yml` around lines 17 - 19, The docker-compose env values
REST_API_BASE_URL, FRONT_END_BASE_URL and API_BASE_URL currently point to the
internal Docker hostname "http://app:8081/" which browsers cannot resolve;
change them to a host-reachable URL by replacing "app" with a public host/port
variable (for example use an interpolated env var like
${PUBLIC_HOST}:${PHPLIST_PORT} or ${HOST}:${PHPLIST_PORT} or a full external
URL) so the browser-facing base URLs resolve outside the Docker network; update
the three keys (REST_API_BASE_URL, FRONT_END_BASE_URL, API_BASE_URL) to
reference the public-facing environment variable(s) instead of the internal
service name.

@TatevikGr TatevikGr changed the title Dev release: dev → main Jul 23, 2026
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