Skip to content

This PR adds Docker support to the project, making it easier to run consistently across environments.#30

Open
CLGREEN94 wants to merge 2 commits into
SonarSoftwareInc:masterfrom
CLGREEN94:master
Open

This PR adds Docker support to the project, making it easier to run consistently across environments.#30
CLGREEN94 wants to merge 2 commits into
SonarSoftwareInc:masterfrom
CLGREEN94:master

Conversation

@CLGREEN94

Copy link
Copy Markdown

Changes

  • Added Dockerfile for building the application image
  • Added docker-compose.yml for local development
  • Updated .gitignore to exclude Docker-related artifacts
  • Updated .README with information about Docker.

@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: 616fe57a78

ℹ️ 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 Dockerfile

RUN mkdir -p permanent_config logs \
&& touch permanent_config/database \
&& cp -R vendor/sonarsoftwareinc/external_tool_template/assets/* www/ \

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve the assets directory when copying web assets

Because the Docker build disables Composer scripts, this line is the only replacement for the existing post-install-cmd asset copy. Using assets/* copies css, js, and brand directly into www/, while the templates request paths under assets/... such as assets/css/bootstrap.min.css and assets/js/custom.js; Docker-built containers therefore serve the UI without its CSS/JS/logo assets. Copy the assets directory itself into www/ as the Composer script does.

Useful? React with 👍 / 👎.

Comment thread Dockerfile
Comment on lines +43 to +44
RUN mkdir -p permanent_config logs \
&& touch permanent_config/database \

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Make the SQLite data path writable by php-fpm

When the Docker UI handles Settings or Device Credentials through php-fpm, the worker runs as the default www-data user, but this creates the SQLite database as root and the compose bind mount can also mask it with a host directory that is not writable by www-data. In a fresh docker compose up, the poller/root process can create or own permanent_config/database, after which web requests that update settings fail with SQLite permission errors. Chown the application data directories/file for the PHP user or run the relevant processes with consistent ownership.

Useful? React with 👍 / 👎.

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.

1 participant